Solved! Go to Solution.
@Tarek_Abualela
You can set this expression to the Valid_if property of the field:
COUNT([Related Press to Enter Stocks]) > 0
And record a specific error message with Error_Message_If_Invalid property
"You should create a stock!"
@Tarek_Abualela
You can set this expression to the Valid_if property of the field:
COUNT([Related Press to Enter Stocks]) > 0
And record a specific error message with Error_Message_If_Invalid property
"You should create a stock!"
Thank You so much
You’re welcome @Tarek_Abualela, my pleasure.
Hey @LeventK , could you elaborate further on this?
I recall using a valid_if on a related table in the past, to ensure that users added at least one related record… But in my most recent application, it is not working.
Specifically, I am trying to use COUNT([Related Inspections])>0
on the [Related Inspections] virtual column, which shows up in the form to facilitate the adding of related inspections…
The problem is, the valid_if formulas don’t seem to evaluate unless there is at least 1 record. Therefore, the COUNT([Related Inspections])>0
is not enforceable.
As a check, I have used COUNT([Related Inspections])=1
, for which the valid_if does evaluate and will not allow more than 1 record, but will still allow 0 records.
Finally, it appears the COUNT([Related Inspections])>0
valid_if can be applied to a separate column and it works in that case. But then the error message does not appear below the appropriate column, which is mildly annoying.
Thoughts?
User | Count |
---|---|
41 | |
36 | |
30 | |
23 | |
16 |