Deleting repeater row using OR logic


#1

Hi folks,

SUMMARY
I’m having trouble deleting rows from a repeater using OR logic. I have created the following example to present the challenge - I’ve added notes and examples to the Axure file which should hopefully demonstrate the challenge
File: Delete row in repeater using OR logic.rp (68.9 KB)
Link: https://4xsoxq.axshare.com/#id=1ewe5i&p=delete_row_in_repeater_using_or_logic

CONTEXT
I am creating a form that users will fill in when administrating a delivery. A range of different users will fill in this form, and the user role impacts which delivery destinations they should see. For example, an “admin” user should see all delivery destinations, but a “retailer” user should only see their customer’s delivery destinations.

AXURE COMPONENT CHOICE

  1. As there’s the need to show a list of delivery destinations that will eventually need to be filterable, I’ve chosen to use the repeater widget. There are other elements in this form, but the purpose of this thread is to solve a specific issue I’m having with the repeater.
  2. As there’s the need to display the same form on multiple pages, I’ve chosen to create this form in a Master. The only thing which will differ between instances of the Master is the list of delivery addresses (the repeater will even be hidden from some users). In the interest of simplifying this example, the link and file attached only contain the repeater which will eventually go into a Master.

THE APPROACH
Given the exact some form will be used across multiple users, I thought it’d be advisable to:

  1. create this form as a master that includes the repeater which contains all the delivery destinations for all users
  2. place the master on the required pages
  3. delete the rows from the delivery destinations after the Master has loaded

THE CHALLENGE
For one of my user roles, I need to delete all the rows from the repeater that meet the following criteria:

  1. Delivery destination = Will’s Warehouse
  2. Customer type = Retailer

When I try to combine these conditions using the OR statement [[Item.Delivery_destination==‘Will’s Warehouse’ || Item.Customer_type==‘Retailer’]] nothing gets deleted from the repeater. You will see this in example 4 of the Axure prototype. However, when I use two seperate delete actions, I get the expected output. See example 5 of the Axure prototype.

What have I done incorrectly that has meant my OR statement isn’t deleting the 4 records I was expecting?


#2

Hello, I tried to see what didn’t work in your file, you have the correct syntax, but you just had to choose the double quote(“value”) for the character strings

[[Item.Delivery_destination==“Will’s Warehouse” || Item.Customer_type==“Retailer”]]

And I tried everything works!