Grouped field validation

Marcelo Montaño Sánchez September 1, 2020

We need to know if there is a way to validate multiple fields as one and not a separate validation for each field.
For example: I have the fields Serial and Brand, I want to allow duplicate serials only if the Brand is different. And not allow if the Serial and the Brand are duplicates.

2 answers

0 votes
tokcum
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 11, 2020

Dear Marcelo,

as far as I know this can not be defined. You can define an attribute as unique but this always refers to all objects with the same object type. I searched for a quite similar requirement in the past without luck. My requirement back then was not related to Brands but to Lifecycle Status.

A workaround could be to define different object types for each brand under the same parent object type and leveraging the inheritance feature for the attributes. Yes, not very beautiful and probably with some "side effects" but worth a try if you do not have dozens of brands. If you have some brands with only a few objects you could even think about a brand called "Other <Name of Parent Object Type>".

Kind regards,

Tobias

0 votes
Fahad Siddiqui
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 2, 2020

@Marcelo Montaño Sánchez  this can be done through scripting.

tokcum
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 11, 2020

Dear Fahad, could you be a little more specific? How could I script such a validation? Thanks, Tobias.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events