Form error after pressing Save

I'm trying to enter two different values within my form and both of them have ValidIf conditions (I'm using [_THIS] to check current user input). The problem is that when I entered the values, which are and should be valid, I don't get the error label which is expected because the values are valid. However, when I save the form, I immediately get an error with the error message of one of the two values. The weird thing is that the values make it to the database but somehow it is failing the ValidIf which it shoudn't be the case 

Solved Solved
0 3 197
1 ACCEPTED SOLUTION

I was able to fix the error. The reference_to_available_to_inspect_list eventually points back to the column that I'm working with. It works at first because the values that are calculated on the virtual columns are valid values but then after it saves the values into the database I guess that the ValidIf condition runs again because some of the values in the virtual columns changed causing the data not to be longer valid. The solution was check for a value that runs after all the data was written successfully is blank or not. 

View solution in original post

3 REPLIES 3

It's weid that the data is actually saved.
The part where the validation is on save is OK, it's expected to work that way afaik.

Please share your expressions for valid_if

[reference_to_available_to_inspect_list] is a virtual column to a list which increaseas in even numbers. The condition checks that the value is within the range. It works as expected except when it is saved


SWITCH(COUNT([reference_to_available_to_inspect_list]),
0,
true,
2,
AND(
[_THIS] >= INDEX([reference_to_available_to_inspect_list], 1),
[_THIS] <= INDEX([reference_to_available_to_inspect_list], 2)
),
4,
OR(
AND(
[_THIS] >= INDEX([reference_to_available_to_inspect_list], 1),
[_THIS] <= INDEX([reference_to_available_to_inspect_list], 2)
),
AND(
[_THIS] >= INDEX([reference_to_available_to_inspect_list], 3),
[_THIS] <= INDEX([reference_to_available_to_inspect_list], 4)
)
),
6,
OR(
AND(
[_THIS] >= INDEX([reference_to_available_to_inspect_list], 1),
[_THIS] <= INDEX([reference_to_available_to_inspect_list], 2)
),
AND(
[_THIS] >= INDEX([reference_to_available_to_inspect_list], 3),
[_THIS] <= INDEX([reference_to_available_to_inspect_list], 4)
),
AND(
[_THIS] >= INDEX([reference_to_available_to_inspect_list], 5),
[_THIS] <= INDEX([reference_to_available_to_inspect_list], 6)
)
),
8,
OR(
AND(
[_THIS] >= INDEX([reference_to_available_to_inspect_list], 1),
[_THIS] <= INDEX([reference_to_available_to_inspect_list], 2)
),
AND(
[_THIS] >= INDEX([reference_to_available_to_inspect_list], 3),
[_THIS] <= INDEX([reference_to_available_to_inspect_list], 4)
),
AND(
[_THIS] >= INDEX([reference_to_available_to_inspect_list], 5),
[_THIS] <= INDEX([reference_to_available_to_inspect_list], 6)
),
AND(
[_THIS] >= INDEX([reference_to_available_to_inspect_list], 7),
[_THIS] <= INDEX([reference_to_available_to_inspect_list], 8)
)
),
true)

 

I was able to fix the error. The reference_to_available_to_inspect_list eventually points back to the column that I'm working with. It works at first because the values that are calculated on the virtual columns are valid values but then after it saves the values into the database I guess that the ValidIf condition runs again because some of the values in the virtual columns changed causing the data not to be longer valid. The solution was check for a value that runs after all the data was written successfully is blank or not. 

Top Labels in this Space