Bulk selected rows to one row

Hello,

I am new to appsheet, and was wondering if this is possible.

I have a table with 5000 rows which represent stock of parts for house maintenance. One row is one item with uniqueID.

The second table is for working orders, with informations, adresses, etc.

My idea was to have a search in stock table, and bulk select up to 4 items and copy that serial numbers in 1 new working order in another table(only 1 row, with 4 columns for those items)

Hi Carca, welcome to our community!

Sure you could do this!

You could make 1 column which the base type is enumnlist and referenced form your table that contain all data of yours item.

Then you can make form which contain of your working orders, with informations, address, etc.

2 Likes

The enum list field looks small, my idea was to have a table view to select, so the user can scroll right or left to have a better look what is selecting.

Is there a way to hit an action from table view maybe ?

Sure,

First, you need to make a behaviour to add values from first table (Database Table) to your second table (Process Table).
Next, move to UX your second table (Table Form). There is behaviour section, you can change it to your new created behaviour. It will trigger add to new row when you click on table.

If I could afford you a recommendation. instead of making of table view.

You could make a dashboard which contain of this two table.

First view contains of all your database. And second view, contain a form.

I think you can achieve your goals with this ways too.

1 Like

Good Idea, but I think this will add as many rows as I copy to another help table. Is there a trick how to add only those uniqueID’s to one row(1 ID to 1 column)

Animation.gif

Another possibility.

  • Create a SELECTIONS table and add an entry when you select a row in the PARTS table view
  • Set up the initial value of the 4 cols to something like
INDEX(
 ORDERBY(
  SELECT(selections[part_id],TRUE),
  [_RowNumber]
 ),
1)​ // 1, 2, 3, 4 respectively
  • When you add a new work order, the cols will be auto populated
  • You could create a few housecleaning things like clearing the SELECTIONS table, highlight selected products, etc.

Hope this will give you another option.

4 Likes

Thank you, brilliant idea!!! :+1:

1 Like

@TeeSee1

how do you clear the selection table?

The way I have set it up is

  • on the work order table create an action using “Data: execute an action on a set of rows” to call the system generated delete action on the SELECTIONS table with the referenced rows as FILTER(“SELECTIONS”, TRUE) to delete everything
  • Set the action in the Save event action of the work order form

Just as a note: if the app is a multi user app, then you need to do some filtering based on USEREMAIL or something to avoid user interference with one another

2 Likes

thanks, works perfect!!!

For individual row clearing, set delete action on the SELECTIONS view’s row selected event, if you have not done so already.

Can you please help me how this selection table is set up?

  • part_id: ref to parts table and the key of this table
  • user: optional, initial value USEREMAIL(), if used, set a security filter on this table