Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

autopopulate a text field in a table from table

Avatar

Former Community Member

I am not sure if it is possible but I will explain what I would like to do:-

I have a table which allows the user to add a name, they also have the ability to add additional names to the table. What I would then like to do is auto populate another table with those details.

Any assistance would be appreciated.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

If you had textfield objects that were outside of a table, then you would have the same name for both objects and use the global binding (see the Object > Binding palette).

This effectively gives you two-way binding. Whatever a user types into one field, will automatically appear in the other.

However this may not work with textfields in tables, or certainly not in dynamic tables where the user can add rows. This is because the value in an object in one row will be repeated in ALL rows.

So if you have a static table where the user cannot add rows, then you could set up the rows and objects with different names. The associated static table would have the same naming structure. Then global binding would work.

If the table is dynamic, then I have a scripted example here, where there is a loop on the exist event that runs through the table and replicates the data in the associated table. See here: http://assure.ly/eTOXaH.

Hope that helps,

Niall

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

Hi,

If you had textfield objects that were outside of a table, then you would have the same name for both objects and use the global binding (see the Object > Binding palette).

This effectively gives you two-way binding. Whatever a user types into one field, will automatically appear in the other.

However this may not work with textfields in tables, or certainly not in dynamic tables where the user can add rows. This is because the value in an object in one row will be repeated in ALL rows.

So if you have a static table where the user cannot add rows, then you could set up the rows and objects with different names. The associated static table would have the same naming structure. Then global binding would work.

If the table is dynamic, then I have a scripted example here, where there is a loop on the exist event that runs through the table and replicates the data in the associated table. See here: http://assure.ly/eTOXaH.

Hope that helps,

Niall

Avatar

Former Community Member

Hi Niall,

Just what I wanted, thanks again for your help.

Steve

Avatar

Level 3

Hi Niall,

Can I ask a question in relation to the script in the example file: http://assure.ly/eTOXah - I have a form that has two options at the beginning - click on one checkbox and it opens the 'original order' subform and click on the other checkbox and it opens the 'change to existing order' subform. The 'original order' subform has a dynamic table where the user can add rows. In this table is a dropdown list with the products available. The user wants to be able to complete this form and send it away.

They then want to open the form at a later date, choose 'change to existing order'. This subform needs to retain the choices/data from the dynamic table inside the original order subform and add a new table below where the new products can be ordered. I have tested the form by making choices in the original order, saving the form, opening the form and choosing 'change to existing order'. The table in this subform only retains the first row information and the other rows are not visible. Is there any way of making this work? Sorry if this doesn't make sense. I can send you the form if that helps.


Thanks for your help.