Dropdown and 2 repeaters interacting with each other

repeater-widget

#1

Hi all!

First time using the Repeater widget here and I’m struggling big time.

In the attached example, i need to 1) constraint rows in the repeater depending on what they pick in the ‘ready for pickup’ dropdown selection. In addition to that, 2) what they select in the top repeater would filter out the rows in the second repeater. 3) When unselecting, the row should appear again.

I got it working as far as doing #2, the filtering rows part. I can’t get point #1 and #3 to work after hours of Googling and attempting it myself.

Any help is much appreciated!! Thanks so much!


Axure_help.rp (80.4 KB)


PLEASE HELP! Linking dropdown selections to cue another dropdown selection
#2

Hi!

Just how in OnItemLoad you are setting the selected state of a day based on its “isSelected” column, in OnItemLoad you also should be disabling a day based on the “isDisabled” column.

Then instead of using the Disable command in your dropdown, you would use two Update Rows commands to update the disabled column where [[Item.colWeek == ‘Sat’]], with the second command using ‘Sun’. (You should not be doing any filtering, as you don’t want the whole column to disappear.) Note that the Update Rows command causes OnItemLoad of the updated repeater to rerun.

In the second instance, it’s tricker, but it would go like this:

OnSelected (of date in repeater 2)
  Update rows (of first repeater) set isSelected to true where [[TargetItem.colWeek == Item.colWeek]]

You would do the same thing for OnUnselected, but set it to false instead of true.


#3

Hi!

Thanks so much for taking your time to help! I was able to set the disabled state accordingly. I’m finally getting somewhere :smile:

As for your comment about not doing any filtering, do you mean that I should remove the filter on the button:

And instead, use the Update Rows command or does this only apply to repeater 2?


#4

Hi!

It depends on what you want. If you want the date column (e.g., Sun) to disappear entirely, then you’d filter. But if you just want to disable it., then use the Update Rows command setting the isDisabled column, assuming you’ve set up the logic in the OnItemLoad interaction to display dates as disabled or enabled based on the isDisabled column.


#5

Hello,

If I select a day in repeater 1 (ex. Sun), repeater 2 would hide that day. This is a desirable outcome.

Now, if I unselect the day (ex. Sun) in repeater 1, how do I make that day (ex. Sun) appear again in repeater 2?

Axure_help_2.rp (137.2 KB)

Thanks!