Moving selected repeater rows to another repeater

Hi all, I’m trying to create a scenario where selected rows from a repeater on tab 1 are moved to a row repeater on tab 2 when clicking a button (the Accept button in my example). I’d then like to be able to perform the same process on tab 2, so selected rows would be moved to tab 3 on clicking a button (the Batch button in my example). At the moment I have only got this working with 1 row at a time, but I need it to work with multiple selected rows.

I’d be grateful for any help.

Move Repeater Rows.rp (140.6 KB)

Hi, JopSmith. It sounds like the goal is to have any given row visible under exactly one tab at any given moment. Is that right? Instead of having three different repeaters and moving rows, what if you added a column to your repeater that contained this information, then just filtered based on the current view?

This would involve something like these steps:

  • Adding a column to the repeater (called “tab,” for example). All rows default to a value of 1.
  • Add filter interactions to the tabs, and fire the click event on tab 1 when the page loads.
  • When checked, mark the row.
  • When “accept” is clicked, update the value in the tabs column in marked rows to the current value + 1. Since your repeater’s already filtered, they should disappear. You probably want to unmark all the rows at this point.

This also gets around needing the logic accept button to determine which repeater you’re looking at when it’s clicked.

Hope this helps.


Thanks @Jeff_Harrison.

So essentially there’d be a single repeater which filters on the click of each tab right? I think I understand your method, but any chance you could help me out with a working example by updating my RP file above? Thanks

Yep, that’s the idea. I don’t have time to build it for you at the moment but maybe later, or someone else can take a shot.

Using @Jeff_Harrison suggestion for one repeater…

Duplicated Page 1 to Page 2, only changed Page 2. Styled background on Page 2 just so I could easily keep track of which page in browser when testing.

Copied one table to Tabs group, outside of dynamic panel (dp), copied Header table outside of dp, then deleted dp.

Placed repeater widget, “Marked row” in the Cells group so it doesn’t need it’s own Click event and doesn’t additionally need to be selected/unselected.

Changed the Enable/Disable action in Case 3 to simply disable the group, "Cells" instead of all the individual widgets within it (just simpler this way)

Changed Case 4 condition to match "Ready" or "Accepted" since both had same color. Then changed Set Text to "Col4 to [[Item.Col4.toUpperCase()]] so it works for either string. (Not clear why the Col4 values in repeater sheet could not just be all caps, but I left syntax as you had it.)

Added :disabled state to the Cells widgets to make more apprent row is disabled.

Jeff had a good suggestion to add a new column to repeater sheet to track which tab is active/shown, and filter on that column, but it looks like you already have enough logic set up for this: Tab 1 shows Submitted and Rejected rows, Tab 2 shows only Accepted rows, and Tab 3 shows only Ready rows. So, I set up repeater filters in each tab’s Click or Tap event:

Tab 1: Add Filter (Name: T1), (Rule: [[ Item.Col4 != ‘Accepted’ && Item.Col4 != ‘Ready’ ]] . This means it will show any row in which the value in Col4 does not equal (!=) Accepted and does not equal Ready. (Who knows, maybe you’ll need other Col4 values/categories in future. Seemed like critical logic was they shouldn’t be Accepted or Ready on Tab 1.)

Tab 2: Add Filter [[ Item.Col4 == ‘Accepted’ ]]

Tab 3: Add Filter [[ Item.Col4 == ‘Ready’ ]]

Note that each filter keeps the default option to “Remove other filters” so they don’t get faceted (nested filters).

Changed code for Accept button to "Update Rows InvoicesTable set Col4 to “Accepted for Marked”, then “Unmark Rows InvoicesTable all rows”, then “Fire Event Tab1 fire Click or Tap” so the filter gets applied. Seems like this could maybe fire Tab2 to progress user along. But, I kept it as you had it, remaining on Tab 1. Oh, and added some Wait 100 actions so your show/hide actions had time to show up before cancelling each other–but 100 ms is so fast it doesn’t make much difference.

Changed code for Batch button similarly.

Added three cases to the Cells group in repeater to enable/disable the appropriate big buttons.

…seems to work now.

Move Repeater Rows.rp (213.3 KB)

Wow, @mbc66 thanks so much! As always, your explanation is super-clear. It’s perfect!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.