Hi Appian DevsI have a situation here to explain, please look at the two interfaces below:Interface 1: Add new templateWe can add new template here,Interface 2: Template DashboardWe can edit the already uploaded template by clicking on the edit icon.I have to validate my text field which is "Template Name". In this, I have called a expression rule where the name of all templates is being fetched from the database. And then, I am able to validate it by checking if the text filed value input by the user does not already exists in the database or not. Case 1: Add New Template: The validation is working fine for the new addition of template.Case 2: Edit Template from template dashboard: In case of edit, the value of the text field is coming pre filled from the rule input. So, even if I change it to a new value, I am not able to validate it for already existing templates using the expression rule.Can you please suggest me a method to streamline the edit case.
Discussion posts and replies are publicly visible
Unknown said:even if I change it to a new value, I am not able to validate it for already existing templates using the expression rule.
Why not? What were you expecting it to do exactly, and what is it doing instead? Can you post a sample of your code that's doing this validation?
Also just for clarification, is the validation you're doing on the template name just making sure it's unique? Or something else?
The validation is just to make the template name unique.
You could take the input Template Name and use that in a query to fetch the list of existing templates. If the query returns an empty dataset then your Template Name is unique, else there's a duplicate.
Thanks for confirming. Any feedback on the other parts of my comment? Without answers to these I won't have much useful feedback to provide quite yet.
Thanks mike for the directions, I solved the error as per the new requirement of the client