In a form update, I am validating on the server whether the "taster" field exists for this login and that it is not the id that I am validating (avoid duplicates). To do this, I made a query that tells me the no. of records with a different id than the one I'm trying to update. If it is greater than zero, it triggers a 409 html response error, otherwise, it updates the data. I don't know what I'm doing wrong in the condition step because it is always updating the data regardless of whether it is a duplicate or not.
Can anyone help me solve this mystery?
Thanks
Please output the {{valid_if_not_duplicate.count_num}}
in a setvalue step to see what exactly does this return.
What value(s) do you expect there? Is the null thing you see the correct value?
If I use a setvalue in the query instead of the count_num field, it already returns data
The custom query returns an array. You need to use
{{valid_if_not_duplicate[0].count_num}}
2 Likes
Can I try using a single-row query? Then it only returns the value, right?
Solved with a single query. Thanks for the quick help!