TextField Validation on a new value and in case of edit

Certified Senior Developer

Hi Appian Devs
I have a situation here to explain, please look at the two interfaces below:
Interface 1: Add new template

We can add new template here,


Interface 2: Template Dashboard

We 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