How can I select multiple rows and set these values in one list to a new row in another table?

Hey!
I could not figure out the next task on my own, so I ask for advice from the community.
Question:
How to create an action from a table view using a multi-selection that will open a new form (a new row in another table) with a preset of the fields of this multi-selection?

0 4 2,436
4 REPLIES 4

Hey @raketa

Unfortunately there is no way to natively do this in appsheet.

You CAN create a system, however, that would implement this functionality in your app. But there is no turn-key solution to make this easy.


What youโ€™d need to do is:

  • Add a column to the table with the records you want to multi-select
    • Itโ€™s only to hold a temporary flag, so hide it & make it a text
  • Create an action to put some temporary flag value into the new column
    • Create a corresponding action to clear the flag
  • Create a slice to pull out the records that have been flagged
    • Create a Ref Action to clear the flag on all the records in that slice
  • Inside the EnumList column that youโ€™re trying to pre-fill: create an Initial Value formula something like the following:
    Slice_Of_Flagged_Records[RecordID]
  • For the โ€œForm Save Eventโ€ of the form view where youโ€™re prefilling stuff; youโ€™ll need to add in the ref action to clear all the flagged records.
    • if you donโ€™t do this, then the flags will remain after things have been used.

With all that in place, youโ€™ll have:

  • A button you can press that will โ€œadd the records to the listโ€
  • When you open the form, the EnumList column will prefill with each record flagged.
  • When you save the form, all the records will be cleared and removed from the slice.

Important Note

  • This sort of interaction within an app is only good for a single-user style app.

If you tried to implement this with a multi-user app, youโ€™d have all sorts of cross-contamination.

Good system- not sure if thereโ€™s a showstopper but it may be possible to use a number (1,2,3โ€ฆ) as the flag and loop through those flagged rows?

It could be worth considering approach in the different way.
Rather than open up the new form with preselected list, open up new form first and then let the user to select out ouf the list then fire the action to loop to add the selected items as child records.

Different approach, but it could bring the same result I believe.

Thank you all for your attention to my task, but I already know the above methods, I thought that there is another method that I do not know).
Everyone who responded is the top contributor to the community, and I really appreciate appsheet for that.

Top Labels in this Space