Hello i am trying to make validation for editable grid in appian so i am not able to enter same value into multiple rows but even when value is entered only in one row validation is triggered. Here is the code for validation:
validations: if(fv!item.value = local!arrayOfStrings,"Id already exist",""),
fv!item.value is always there at least once as it is automatically stored in local!arrayOfString so even if it is not in local variable once i entered the value into grid it is saved into array so i need to check if it is there more than once
thanks for any advice in advance
Discussion posts and replies are publicly visible
Unless I misunderstood, I believe this is covered here: community.appian.com/.../duplicate-string-in-the-string-array
may be you can do a small change
in your instead of local!arrayOfStrings do it like remove(local!arrayOfStrings,fv!index) and then do a condition like if(contains(remove(local!arrayOfStrings,fv!index),fv!item.value),"ID already exist","")
Perhaps you can make a little adjustment.
#papa's freezeria
Hi Juraj,
I think you should try this once, maybe it's work
if( count( wherecontains( tostring(index(fv!item, "value", {})), touniformstring( local!ArrayOfStrings ) ) ) > 1, "Id already exist", null )