My app needs 2 separated validations for a column. The first one is for adding a new row, which is working fine (I have the code shown below in Valid if expression). But for updating data, another different line of code is required. I donโt know how to incorporate these 2 validations in a column Valid if expression because the Add and Edit require different validations. Please kindly advise.
SUM(
SELECT(
Locate[Quantity],
[Object] = [_THISROW].[Object]
)
)
Solved! Go to Solution.
You can wrap it with the IF statement. Something like IF(IN([KeyColumn],TableName[KeyColumn]),โฆ,โฆ)
You can wrap it with the IF statement. Something like IF(IN([KeyColumn],TableName[KeyColumn]),โฆ,โฆ)
Thank you for your advice. But how can I differentiate the Add mode from Edit mode with this IF(โฆ) and IN(โฆ) ? So, I can correctly put my 2 different codes in the IF().
I have 2 different valid codes for each mode. Itโs something like
IF(being in Add mode, do Add valid code,
IF(being in Edit mode, do Edit valid code,
true
)
)
What commands can be used to check โbeing in Add modeโ and โbeing in Edit modeโ?
IN([KeyColumn],TableName[KeyColumn]) will give you a result TRUE if the record already exists and FALSE if not. Then you know which validation formula you should use inside of your IF statement.
Thank you so much. It works.
Regards,
Youโre welcome
User | Count |
---|---|
44 | |
29 | |
23 | |
20 | |
15 |