Populating form fields from table selection



I have two pages (actually Panel States), where on the FIRST panel state is a repeater table and the SECOND panel state is a form. The user is able to select rows from the repeater table (checkbox) and, once a button is pressed, I need the names (column LastName) to populate respective Text Fields on the following panel’s form (LastName 1, LastName 2, LastName 3) - only doing 3 instances, because, prototype.

My thoughts were to add each of these LastName instances to a string/array within a Global Variable - SelectedLastName:
[[SelectedLastName]],[[item.LastName]] and then do a .split method to parse out each instance from some trigger on my second panel state.
Set text on LastName 1 to “[[LVAR1.split(‘,’,2)]]”
where LVAR1 == SelectedLastName. Or something like this for each Text Field LastName instance.

I’m good with trying not this, like using another Repeater. Anything really.



You could use a repeater in each panel state and just add records from one repeater to another? The requirement to only do three makes it a lot more complicated if they can select any three from the list though.


I’m a bit unclear on what exactly it is you’re trying to achieve so I might be completely off the right track…

Can you get away with just populating the different fields as soon as the name is selected? When a name is selected, you check for a blank field and puts the name there. When a name is unselected, it checks to see what field contains that name and clears it. After that, you prevent people from making another selection until they unselect a previous one.

FormFill.rp (76.3 KB)