Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Custom field value validation for duplicates

Иван Кузнецов
Contributor
August 23, 2019

Hello All,

We have specific issue type, where Service Desk team should fill Custom fiels with number value. Because of gaps in the process, sometime this information can be already documented and it will be duplicated.

It is possible to make validation for Customer Field, to search inputted value in all issues in the Project and print error message, if same value exists in other tickets?


Thanks!

2 answers

1 vote
Diego Cañete
Contributor
August 26, 2019

Hi Иван Кузнецов,

If what you need is to verify that the value entered is not duplicated, try this Boolean expression.

Only if the following boolean expression is true: count(filterByValue(fieldValue(%{field_name}, filterByIssueType(getIssuesFromProjects("ProjectName"), "IssueName" ) ) , =, %{field_name})) = 0
Message to show when validation fails: "Messages".

 

If what you need is to verify that the value entered is not duplicated, try this Boolean expression.

I use this expression to prevent the user from entering a duplicate ID number. (Document Number used in Brazil).
  So you can replace the values with your project name and your field number.

Tell me later how it went to verify and learn if there is any error.

Greetings.

Diego.

0 votes
Diego Cañete
Contributor
August 26, 2019

Be careful with the blanks, they were a headache and they gave me many mistakes.

Suggest an answer

Log in or Sign up to answer