Hi Appsheet teams,
I want that if any entry has been made in the current date. Its entry should not be repeated in the current date, it should be shown as duplicate. Can you correct this expression of mine?
Valid If formula for column CHANNEL (Yes/No,List)
COUNT(
FILTER(
"photos",
AND(
([channel] = TODAY()),
IN([_ROWNUMBER], SELECT(photos[_ROWNUMBER], ([channel] = TODAY())) - LIST([_ROWNUMBER]))
)
)
) > 1
Error_Message_If_Invalid formula for column CHANNEL (Text)
IF(
COUNT(
FILTER(
"photos",
AND(
([channel] = TODAY()),
IN([_ROWNUMBER], SELECT(photos[_ROWNUMBER], [channel] = TODAY()))
)
)
) > 1,
"Duplicate",
" "
)
As you are using this with the Valid_If, the answer needs to be either Y/N or a list. The easiest way to do this is to keep the COUNT(…)<2 and when it fails, say it with your own error message.
As the validation is already doing the check is it valid or not, you don’t need to have any formula in the error message.. just the text “Sorry, only one entry is allowed per day. You already have an entry for today.” is enough.
Don’t know your app/table details or where you are using this, but maybe something like..
COUNT(SELECT(Photos[KeyColumn],[Channel]=TODAY()))<2
not working

COUNT(SELECT(Photos[ENTRY CODE],[CHANNEL]=TODAY()))<1
As I tried to explain earlier shortly, people in here can only guess or throw some ideas what it might be as you haven’t described all relevant details to this case. For example.. in which table you have this validation, what is the column name, what are the other relevant column names and types, is this happening in the same table or in another than photos table, etc. Without all of these details, people can just guess, unfortunately.
1 Like