Automatically update Now() formula when cloning a row

Hi AppSheet Community

I have an inspection app to flag issues we locate during our surveys.
The app has 2 main tables (Survey as parent and Detection as it’s child)
It happens that certain issues are still present in the next survey and for that I created the option to clone that specific issue.
Now we have to manually update the 2 columns (Survey ID and Date).
When they forget to update the Survey ID they’ll clearly notice and will be corrected but when they forget to update the date column they see nothing.
And when they generate the report the issue will be missing, but due to the high amount of issues sometimes located it’s impossible to know if you have them all in the report or not.

My question:
Is it possible to update the date column automatically? The initial value of this column is is Now() but when cloning it just clones the previous value.
If the above is possible to automate is it also possible for Survey ID to take the latest value instead of the cloned value?

I use the following action to complete the clone:

Solved Solved
0 10 161
1 ACCEPTED SOLUTION

Thank you. Can you instead take a look at the LINKTOFORM() deep link that allows you to define the columns to be copied and / or modified?

View solution in original post

10 REPLIES 10

It is not clear, how you are “cloning” the record? Could you update how you have implemented it in the app ?

My bad there.
For a second I thought it was a build in function of AppSheet but it’s just an action I utilize.
I updated the main post with my clone button.

Thank you. Can you instead take a look at the LINKTOFORM() deep link that allows you to define the columns to be copied and / or modified?

This might indeed be what I need.

To make sure I understand correctly, Do I have to fill in every single column I want to copy like below?

LINKTOFORM(“Table2 Form”, “Name2”, [Name1], “Color2”, [Color1])

And for date I’d have to use “Now()”, [Date] and survey ID “MostRecent”, [Survey ID]

Thanks for your assistance so far.

Yes, you need not feel every single column. You may however need to fill in any “Required” status columns.
Your expression could be something like

LINKTOFORM(“Your Form View Name”, “Date”, NOW(), “Survey ID”, [Survey ID])

This will copy the [Survey ID] of the record from where the record is being copied or “cloned” as you have named it.

I want to copy everything except Date and Survey ID.
Survey ID needs to be the one from the previous manual entry and not the one from the clone.
So it will be “Survey ID”; [MostRecent] ?

If you have a column called [Most Recent] in the record being copied, then yes.

Whatever you want to copy, please follow the syntax. such as (“Column 1” , [Column 1] , “Column n”, [Column n]) and so on where the column names in double-quotes are in the target record and those in "[ ] " notations are from the source record.

If you wish to populate with specific values but not from the source record, you could use the following syntax

(“Date”, TODAY()) which will populate the [Date] column in the target record with TODAY() date.

Ok, I think it’s clear to me.
I’ll do some testing to see if I can get it to work.

Thanks a lot!

Hey Jens_Damen,

Seems like y’all might have a good handle on it, but I know AppSheetTraining has a “Vehicle Inspection App build” on their YouTube that might be able to also show you a bit about inspection type apps.

Link to video: Field Inspection App - AppSheet Tutorial for Beginners - YouTube

Hope that can get you further in the right direction. If needed, they also have a more in depth course on some more advanced features on their website for an inspection app.

Have a good one!
Cale

Thanks Suvrutt and Cale!
I managed to implement it and it’s working just as I imagined it.

Top Labels in this Space