Can I Autofill based on last record entry, but only if that previous entry was today?

Hi,
I have an app set up that I'd like to autofill certain fields based on today's previous entry, but leave blank if there haven't been entries today.

Basically the app is only used by one person a day, but that person can change day to day.
They input records during the day, and part of that record is their name to show who entered it. Is there a way I can take the name already input on the first record of the day, and when they put in the next record it automatically copies the name over?
I would also like it to sequentially increase a record number when a new record is created. This needs to start at #1 for the first record and increase automatically with the next record (currently the user types this in manually). When we start a new day, we start at #1 again so it's not simply based on the previous record. 

Could anybody help me achieve this please?

0 1 170
1 REPLY 1


@G-RM wrote:

Basically the app is only used by one person a day, but that person can change day to day.


Please create a slice called say, " Today_First_Record" on the table with a slice filter expression something like 

[Table Key]=MINROW("Table Name", "_RowNumber", [Date Column]=TODAY())

MINROW() - AppSheet Help

Then in the "Initial value" setting of the [Name] column, please have an expression something like 

ANY(Today_First_Record[Name])

With the above implementation, after the user of the day fills in the first record with her/his name, the subsequent records of the day will have the user's name prefilled as an initial value.


@G-RM wrote:

I would also like it to sequentially increase a record number when a new record is created.


Please take a look at the following post.

Serial Numbers, If You Must - Google Cloud Community

There are many more tips on the topic of sequential numbers

Search - Google Cloud Community

Please note that both the above approaches are possible because you have mentioned the app is a single user at a time app. AppSheet does not support sequential number generation in multi user apps.

 

 

 

 

 

Top Labels in this Space