You can do this, but the solution isnât straight forward. Axure doesnât provide a built-in way to query specific rows in a repeater (e.g., a property like [[MyRepeater.Row.3.Column1]] or a âGet Column Valueâ action.) Instead, you can devise a âlistener methodâ in which you set up a way to identify a âtargetâ rowâmaybe it is âthe third rowâ or maybe it is âthe row with account number 69ââand then âpingâ a widget in the repeater, so each and every instance (row) âlistensâ to the ping and responds if it is the target row.
If the discussion below is too complicated or you canât get it to work, Iâd be happy to demonstrate it for you if you can upload a sample .rp file with your repeaters set up.
I have used two ways to create a ârepeater listener methodâ:
- Utilize an otherwise unused event for a widget in repeaterB, like Moved or Rotated.
A. Clicking an âUpdate Rowâ button in repeaterA can set the âtargetâ and initiate the âpingâ âŚsomething like,
Set Variable Value OnLoadVariable (or whatever global variable) equal to text on MyInputField
Add Row to This, column AccountNumber, to OnLoadVariable
Move textWidgetName by (0, 0) //Just some widget in repeaterB; it doesnât actually get moved, just a way to trigger the Moved event. You can also call âFire Event Moved for textWidgetNameâ
*Keep in mind that âmovingâ a widget in a repeater will move every rowâs instance of that widget (in very rapid succession from row 1 to row N) so youâll need a way to test each row to see if it is a target row.
B. For this widget in repeaterB, (maybe it holds the text for âAccountNameâ) set up a way to âlisten to the pingâ via a Moved action which updates your new row in repeaterA, but only if it is the target row. Use a conditional case to test if it is the target row:
If [[Item.AccountNumber]] equals value of OnLoadVariable
Update Rows
in RepeaterA where [[TargetItem.AccountNumber == OnLoadVariable]]
set column AccountName equal to [[Item.AccountName]]
set column FundNumber equal to [[Item.FundNumber]]
set column FundName equal to [[Item.FundName]]
- An alternate approach, instead of using an event like Moved is to use the Update Rows action and a column specifically for the purpose of returning a value or data from the repeater dataset (or states of any widget therein.) The basics are the same as approach 1, but the code to handle things is in the repeaterâs Item Loaded event, instead of a widget in the repeater.
A. To use the data in a row with account number of 1002, call something like,
Update Rows
in repeaterB
[[TargetItem.AccountNumber == â1002â]]
set column DataReturn equal to âtrueâ]]
B. In the Item Loaded event in repeaterB, set up a conditional case to âreturn the dataâ when the value of the column named DataReturn is âtrueâ. In your case, this means updating the newly added row (or any row with a matching account number):
If [[Item.DataReturn]] equals âtrueâ
Update Rows
in RepeaterA where [[TargetItem.AccountNumber == Item.AccountNumber]]
set column AccountName equal to [[Item.AccountName]]
set column FundNumber equal to [[Item.FundNumber]]
set column FundName equal to [[Item.FundName]]
Update Rows
This row
set column DataReturn equal to âfalseâ
Approach 1 is more commonly usedâI learned it from the infamous Gregor on this forum many years and RP versions ago RP6?âand youâll find many forum threads describing this. It is pretty much a hack, is limited in its scale (only so many unused events; and if you later need to actually move a widget for real it can break) âŚbut it does work.
I devised the second approach (and it may not be original) a few years ago to help a broader team understand and collaborate easier on a team project. It feels more âofficialâ --less of a hackâand makes the act of âcalling a target rowâ easier, as well as making the code more visible as it is in Item Loaded and not hidden in a random event of some widget. It should be more extensible/scalable as you can add additional columns and cases for different types of âreturnsâ or actions.