Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How do I replicate rows from expanding table into three separate read only tables based on selection from dropdown

Avatar

Level 2

How do I replicate/copy rows from expanding table into three separate read only tables based on selection from dropdown in the expanding table. The Items table has several columns for the user to complete about items being purchased, the last column has a dropdown (Disposition) to choose how the item should be accounted for (expendable, durable and non-expendable) I want put the items from each category in a table on it's own page. What is the best way to accomplish this?

jeffm70816839_0-1630575015996.png

 

1 Accepted Solution

Avatar

Correct answer by
Employee

@jeffm70816839 that can be achieved with scripting...

Basically you create 4 dynamic tables. The first one being the source, the other 3 positioned in separate pages.

The change on the drop down will trigger some script where you select the static table, add an instance and copy the needed columns.

This is not trivial though. What happens when you change an existing one. You need to remove the matching from one table and add it to the other. 

When you delete the main entry, you also will have to find and remove the corresponding entry in the correct table.

This is too complex for me to conjur up a quick example. I simply don't have the time for it.

 

You might consider filling those tables not while the user is still editing the main table but place a script either in a button or as part of the submit or close. It runs through 1 time and builds up all tables with the correct entries.

 

Alternatively, if you must update immediately, you could "destroy" and "rebuild" the other tables. That might not be the best experience for the user though - especially the longer the table gets.

View solution in original post

3 Replies

Avatar

Level 2

Is there a way to copy a row in an expanding table based on a choice from a column in the table and paste in a new table on a separate or summary page? I assume there is a way to do this with java. Any help would be greatly appreciated.

Avatar

Correct answer by
Employee

@jeffm70816839 that can be achieved with scripting...

Basically you create 4 dynamic tables. The first one being the source, the other 3 positioned in separate pages.

The change on the drop down will trigger some script where you select the static table, add an instance and copy the needed columns.

This is not trivial though. What happens when you change an existing one. You need to remove the matching from one table and add it to the other. 

When you delete the main entry, you also will have to find and remove the corresponding entry in the correct table.

This is too complex for me to conjur up a quick example. I simply don't have the time for it.

 

You might consider filling those tables not while the user is still editing the main table but place a script either in a button or as part of the submit or close. It runs through 1 time and builds up all tables with the correct entries.

 

Alternatively, if you must update immediately, you could "destroy" and "rebuild" the other tables. That might not be the best experience for the user though - especially the longer the table gets.

Avatar

Level 2

I was leaning towards having a button on the 3 Summary pages (but again I don't know Java enough to create the script) to run that would populate a filtered copy of the original table after it's completed to avoid the issue of multiple adds or deleting rows.

Any Java guru's out there that can give me a sample that could do this?