Finding today's record and if not adding a new one

Hi all,

I have a query that bring the last recored filter by the day. First I create a variable and transform the current time to midnight. Named: Dtoday

Then I query all results where created_at >= Dtoday. Output as single descending so I bring the latest record.

Then I added a Add or Edit Record with the intention that if a record is found, edit it or add if not. However I am getting an error

Exception: Param: field_value - Text filter requires a scalar value.

On the Add / Edit record I trying to find the latest record from previous query.

Any help to make this function work?

3 replies