Hi, I am using a security filter to look for two records on a search table, which contains search criteria. This is for a public available app, with no-login.
One record is based on a ‘session-id’ based on date (yyyymmdd) and the device UUID
The other is a ‘default’ record, which is largely blank with a session-id of “0000000000”
The idea being that if an anonymous user has used the app and the search capability today, then the app should ‘remember’ the search criteria they have entered. If they haven’t used it today, then they are presented with the default blank record.
This is required to ensure multiple anonymous users do not accidentally share the same search record.
The following, can return any of the two records in any order and doesn’t favour one over the other. I have tried MAXROW, but that generated an error.
[SessionID],CONCATENATE(TEXT(TODAY(), “yyyymmdd”), “-”, CONTEXT(“Device”)),
[SessionID] = “0000000000”
I have tried an IF statement but that generated an error too. Currently I am trying the following in an attempt to ensure if a record exists for TODAY for the device being used then that search record is presented.
IN([SessionID],split(CONCATENATE(TEXT(TODAY(), “yyyymmdd”), “-”, CONTEXT(“Device”)),“0000000000”, " , "))
Q: Is there a way to check for the presence of a record and use that if exists or ensure the order of results returned, favours the ‘device’ record not the default record?