I have an interface where I am loading the data in a read only grid using a recordType and also I have a "ADD" button to provide a new item to add.
Now, when the user is trying to save a text fields data, I would like to compare text fields data with a recordType fields/columns..
Can someone advise on how to compare user enter data in a text field with a recordType or Read only grid column. If user is trying to enter same data, I would like to return a validation message.
Discussion posts and replies are publicly visible
This is a little vague, but in general, if you want to ensure a user is entering a unique value in a text field (compared to any prior values entered in the DB), then what you can do is query the DB table and filter on the value the user entered (presumably using the "=" operator for a relatively exact match), and show a validation error if there are any maches to the query.
Could you please let me know if it possible to load entire data into a local variable and start comparing with the user entered data in the text fields, instead of going to database every time.
i'd strongly recommend against that, unless the "entire data" you want to load into the local variable is very small (and will always be very small). it's quite a bit easier to do a targeted query for comparidon at the time you need to do the validation.
© 2023 Appian. All rights reserved.