What would be an efficient valid if expression for,
If there's already a record that has; DATE=TODAY() and the same Customer_id, cannot create a this record
๐
Solved! Go to Solution.
Please try below. I have highlighted the slight ( but important )change.
ISBLANK(
FILTER(
"Aไฟฎ็ไพ้ ผ",
([ๅไปๆฅ้กงๅฎข]=CONCATENATE(TODAY() & " (" & [_THISROW].[id_M้กงๅฎข].[ๆฐๅ]ใ& ")") )
)
- LIST([_THISROW])
)
Please create a concatenated VC or real column ( if the new customer is being added through form) called say [DatenID] with an expression something like CONCATENATE([Date], "-",[Customer_id])
Then your valid_if in [Customer_id] column ( or any other column of the form as this will basically prevent addition of the record thru' svalid_if error) can be something like
ISBLANK(
FILTER(
"Table Name",
([DatenID]= CONCATENATE(TODAY(), "-",[Customer_id])
)
- LIST([_THISROW])
)
Edit: If you have many records already prepopulated in the table , then you will need to manually populate the [DatenID] column for those existing records for at least today's records if you wish [DatenID] to be a real column. With VC that will not be a problem.
Did above but gives me a shows me the invalid value error message for new customers being added through form and customers that has not yet created a record
Pleas share details of your implementation such as expression, real column or VC etc. and relevant screenshots.
In my customer_id's Valid if;
ISBLANK(
FILTER(
"Aไฟฎ็ไพ้ ผ",
([ๅไปๆฅ้กงๅฎข]=CONCATENATE(TODAY() & " (" & [id_M้กงๅฎข].[ๆฐๅ]ใ& ")") )
)
- LIST([_THISROW])
)
in my Invalid value error;
"Cannot create same day, same customer"
but just in Japanese.
my version of [DatenID] is a VC;
CONCATENATE(TODAY() & " (" & [id_M้กงๅฎข].[ๆฐๅ]ใ& ")")
What is the key column of your table?
[id] which is UNIQUEID()
made a TEST app, to make sure nothing else on my end was making this go wrong.
But seems like its the same.
You're able to create a Customer just for the first time, and every time since it'll give me an Invalid value error.
Please try below. I have highlighted the slight ( but important )change.
ISBLANK(
FILTER(
"Aไฟฎ็ไพ้ ผ",
([ๅไปๆฅ้กงๅฎข]=CONCATENATE(TODAY() & " (" & [_THISROW].[id_M้กงๅฎข].[ๆฐๅ]ใ& ")") )
)
- LIST([_THISROW])
)
ahhh, I see!
Yes it worked, Thank you very much!! ๐
User | Count |
---|---|
18 | |
11 | |
7 | |
3 | |
2 |