We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Create Unique records from multi row variable set

Amrutha K V
Tera Contributor

Hi 

We have a Multi-Row Variable Set (MRVS) named "MRP PRODUCTS PLANNING". Inside this variable set, there is a select box variable called "Plant & Storage Location" . 

Users should be allowed to create only one record for each value in the dropdown. If there are only ten  available drop down values, a maximum of ten records should be created in the MRVS. Duplicate selections should not be allowed, and users should not be able to create multiple records with the same Plant & Storage Location value.
How can we implement this functionality?

Thank you

 
2 REPLIES 2

Ankur Bawiskar
Tera Patron

@Amrutha K V 

how and from where you are creating the records from MRVS?

Flow or workflow or business rule?

there you can add logic

show your MRVS variables form

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron

@Amrutha K V 

approach to take

1) limit MRVS to 3 rows, see this link

2) On the select box variable Plant & Storage Location inside the MRVS:

Set Unique = true.

Keep it Mandatory = true

3) use catalog client script onSubmit to validate the MRVS JSON

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader