Copy Child Ref Data (Sibling Data) before save and sync

I have 2 data tables.

Table 1 - Invoice (Parent)
Table 2 - Invoice Data (Child “is a part of” Invoice)

Process is initially very “see spot run” easy…

  1. Create an Invoice with some very basic user input data.

1a. Add a child (Invoice Data) from within the Invoice parent form… Again it’s pretty basic data inputs, you can call up some reference data from other tables. For example pull in some timesheet data from another part of the app, nothing to special. Hit save in the child and it takes you back to the Invoice parent form screen.

~Here’s where I want the magic to happen!~

1b. Add another child to the invoice just as above in step 1a. But this time unlike in step one where you can reference data from other tables outside of the 2 invoice tables. I would like to be able to have the option to instead import the data from the Invoice Data that I collected in step 1a. Meaning instead of colleting the exact same timesheet reference data. all you need to do is select the invoice data of your choosing, click it and it saves you the effort and possible mistakes.

3X_a_6_a623baf1e0bc262067dec95ba590655ce047b068.png

3X_d_c_dca6969e9ae72c1cf78f7f036f76fcac507a9a3b.png

The difficulty is that I cannot import the data from the selected sibling item until after I have added a child, saved it, then saved the parent invoice. Only then can I go back into the Invoice, add a new child, import from a sibling and have the designated data import.

I can get the KEY ID to appear in the reference list the same session as previously created siblings. It isn’t writing the last saved child data to the table until the parent invoice has saved.

Is there a way to force the child data to save to the table before the parent data save?

Solved Solved
0 7 447
1 ACCEPTED SOLUTION

I found another workaround. I can accomplish what I needed by using Dereferences. They can access the data from previous “pre-save” child references. Works great and it’s less steps for my users base to confuse.

View solution in original post

7 REPLIES 7

I’ll give you the same advice I’ve given to many other people. It is far better, in numerous ways, to create and save the Parent record first, and then add in any Child records. And add those Children from the Parent’s Detail view, not the Form view.

Advice appreciated and understood. It seemed like the path I might have to take, but wanted to confirm with the Appsheet hive mind incase there was another path forward.

Hi Marc, how do I do that, forcing a SAVE on the parent record (Shopping basket) before adding Child records (items)? Or as well, forcing a SAVE on the parent record before “updating” child records (as in changing items in my shopping basket)?

Thank you!

Remove the [Related…] VC from the parent’s Form View.

I found another workaround. I can accomplish what I needed by using Dereferences. They can access the data from previous “pre-save” child references. Works great and it’s less steps for my users base to confuse.

@Christian

I’ll do my best to summarize:

Here’s a snapshot of my columns and the formulas

Here’s a look at the details of the IMPORT LAST ITEM ref column details

If you Pop in a Dereference vs say a “lookup” into the formula for the cells you’re looking to propagate with the previously input data…
3X_4_a_4a9e8be4da179d84fe68dd580e74716f4e50e4f8.png
You will have access to the data that you have yet to save which is a part of the form you’re filling out currently.

So in my case I have an invoice that contains the following tables

  1. Invoice (the master)
  2. Invoice items (a related child reference to invoice)

I start an invoice and add items to that invoice. So I add item #1. Then I go to add item #2 I can fill everything out just like I did for item #1 and/or I can just copy the data (but not alter) from item #1 . With the Dereference technique you can see/import the details from item #1.

If you use a “lookup” the data wouldn’t be available until you fully save / sync the invoice.

I hope this helps a little.

Have you tried something similar to this with more data? I have tried once with a table having 10000+ rows and 5 columns in google sheet. It took me more than 160 sec to sync the app just because of a single formula.

I think I did the same with virtual column type List Ref. I am not sure if it’s the same behavior if we use Ref.

Top Labels in this Space