Hey y’all
I’m currently using the MAXROW(Data, Timestamp) formula in a ref. to prefill some form fields with the last entry in the table.
Can someone please help me come up with a formula to only use the last entry within a certain time constraint?
For example if the last table entry is older than an hour, I don’t want the form fields prefilled?
any suggestions on how my INITIAL VALUE form should be to achieve this?
MAXROW() does accept filter condition see this for more details: https://intercom.help/appsheet/expressions/functions/maxrow
You could compare the Timestamp column with now() function and check see if the hour() or hour()+minute()/60 of the duration is within your time constraint. Something like this: HOUR(NOW()-[Timestamp Column])<24
Other than @RezaRaoofi proposed, you could also read it directly like IFS(HOUR(MAX(TableName[Timestamp])-[Timestamp])<24,Prefill…) and then you would not need a virtual column.
User | Count |
---|---|
41 | |
36 | |
30 | |
23 | |
16 |