copy several selected rows of one table to another table (bulk copy)

hi,

i want to copy several selected rows of one table to another table (bulk copy)

i tried with action: APP: copy this row and edit copy - works fine!

but this only copys 1 row at a time - i want to copy several rows in one step ... (the rows i have "bulk-selcted ...)

How can i achieve this?

many thanks in advance!

Bulk_Copy.jpg

 

Solved Solved
0 11 2,639
1 ACCEPTED SOLUTION


@Asheetbogo wrote:

Is it correct that action with name: "Data: execute an action on a set of rows" is the action ("Bulk action") i need for my problem?


No.  It's much simpler than you are thinking.

You only need to create the action that performs the copy = "Data: add a new row to another table using values from this row".  Even though it implies to add a row to "another" table, it can be used to copy rows into the same table as well.  see image below

Once the action above is created, you're done!  To use it you would select your rows in the "Bulk Action" feature, like you have been, then tap the  and AppSheet will send each row to the action one-by-one.

Screen Shot 2022-09-25 at 8.37.56 AM.png

 

 

 

View solution in original post

11 REPLIES 11

Yes, those icons on each row are row specific and will only copy the row they are listed on.  to perform the Bulk copy, you need to use the menu in the upper-right hand corner.  Selecting an action from that list will apply it to all of the selected rows.

Screen Shot 2022-09-24 at 2.19.48 PM.png

hi WillowMobileSys - thank you for your prompt reply.

i tested it out, but there is no icon for "bulk-copy" in the menu in the upper-right corner - when i click on the menu there is only "delete-icon".

Corner_Menu.jpg

in the meantime, i think i understand the reason why:

action is called: "App: copy this row an edit the copy"

... copy this row + edit the copy ... >>> "edit" refers only to single row!

=========================

i also tested several options in menu-section "Appearance"

a) Display overlay
>>> bulk-copy-icon does not appear in table view >>> only in "detail view"
>>> "detail-view" refers to single row!

Detail_View.jpg

b) display prominently
>>> bulk-copy-icon does not appear in table view - only in detail view
>>> "detail-view" refers to single row!

c) display inline
>>> bulk-copy-icon appears next to each row because this action is only a single-row-action ...

d) do not display: this is for automation ...

Appearance_Prominence.jpg

Do you have another idea for achieving "bulk copy"?

many thanks in advance!

 

The view in your original post doesn't appear to be the same.   In that image you were showing an Inline action - the icon you had circled.  If you were to return to that view and  attempt the "bulk action" again, select at least one row, and tap on the "3-dot" menu, you should see the ability to apply that inline action to ALL of the selected rows.

In order for an action to show in the "Bulk action" area , it must be a row level data action.  The "App: copy this row and edit the copy" action did not show up because it is actually a navigation action.  It opens a Form for a NEW row pre-populated with all the details of the row being copied. AppSheet does not allow these in the "Bulk Action" area

For clarity, every action operates on just a single row.  Those cases where there is a list of rows being sent to an action, is just a case where they are sent one-by-one sequentially.  When a row level data action is shown in the app, it will only operate on a single row so it can only be shown where the context of the view is a single row - like a Detail view.

How to perform Bulk Copy?

There are actually 3 ways:

1)   Bulk Action - It will work for copying of user selected rows.

2)  Automated copy - If you can determine programmatically which rows need copied, then you can automate that process - either in a set of actions maybe attached to the saving of a Form or by use of a Bot.

3)  Create a custom user selected copy feature - a lot like the Bulk Action copy but you can build it as a very visible dedicated process.  The main idea is to add a flag column and provide some custom way for a user to mark the rows to be included in the action.  A button is then shown that once pressed, all marked rows are then acted upon.  One advantage is that copy can be done piecemeal and performed when the user is actually ready.

Hi @WillowMobileSys - I am trying to achieve scenario 2 - Automated Copy. Only thing which I don't understand is, how multiple child records gets copied. Would be kind to elaborate this approach please? Thanks.

Hello WillowMobileSys,

many thanks for your detailed reply!!!

You confirmed that action with name: "App: copy this row and edit the copy" is no "bulk action".

you wrote: 1) "Bulk Action" - it will work for copying of user selected rows.

Is it correct that action with name: "Data: execute an action on a set of rows" is the action ("Bulk action") i need for my problem?
#1 BulkAction.jpg

Step 1:
When i setup "Bulk Action" ("dublicating" some rows in the same table ...) i am asked for "referenced rows" - i don't want to pre-define the Bulk for copying here but i want to use "bulk-select" in the appsheet menu - but without input of "Referended Rows" i get error-message - i only can get it to work if i input some Ref-Keys for BulkCopy ...

how can i solve this problem?

#2 ReferenceRows.jpg

Step 2:
As a Referenced Action there is only "add" (no "copy" ...)

Step 3:

Testing now works fine - after selecting items i get my "BulkCopyAction" in the upperRightMenue

#3 TestBulkCopy.jpg

But after clicking on button i get a inpurt form to manuly input some values.

#4 FormOpened.jpg
> after pressing "save" only this record is shown in the list of items ...

#5 Table.jpg

what can i do to solve all this problems to achieve this "oneClick" copying of bulkselected items
a) to the same table
b) to another table

many thanks for your help in advance!!!

 


@Asheetbogo wrote:

Is it correct that action with name: "Data: execute an action on a set of rows" is the action ("Bulk action") i need for my problem?


No.  It's much simpler than you are thinking.

You only need to create the action that performs the copy = "Data: add a new row to another table using values from this row".  Even though it implies to add a row to "another" table, it can be used to copy rows into the same table as well.  see image below

Once the action above is created, you're done!  To use it you would select your rows in the "Bulk Action" feature, like you have been, then tap the  and AppSheet will send each row to the action one-by-one.

Screen Shot 2022-09-25 at 8.37.56 AM.png

 

 

 

I want to ask, did you keep the step 1 or you change the action into "Data: add a new row to another table using values from this row"?

hello WillowMobileSys,

many thanks for your detailed reply!!!

i tested it out - it works perfect 

a) bulk copy to same table: ok

b) bulk copy to separate table: ok

in the meantime also with my own testing i know a lot more about actions!

thank you so much - you are the best !!!

 

I need this but to ther table not the same

In my case I need to copy the 12 monthly payments to the student's profile, the monthly payments are in the payment master and I want to copy studentDetails

hi,

a) bulk copy to same table: ok

b) bulk copy to separate table: ok

1. goto: "Behavior" >>> "+ new action" >>> Do This: "Data: add a new row to another table using values from this row"

2. For a record of this table: here you select the table you want to copy from ...

3. Table to add to: here you can select the table you want to copy to ...

a) the "same table" for copying the bulk to the same table

   or

b) "another table" for copying the bulk to another table....

My solution does not automatically select "rows" - i have to manually select the rows an then press the "actions button 1" or "action button 2" to perform the tasks.

Your question: "12 monthly payments to the student's profile"

>>> for automatic selection of "12 monthly payments" i cannot help you - this is to complicated for me ...!

Maybe one of the "Top-Forum-Members" can help you with this...

king regars

 

Top Labels in this Space