Restrict Duplicate Records updated After selecting it from Variable field

Joyal Robert
Tera Contributor

Hi All,

 

We need to restrict the other records to be updated with same display name and different serial number

Scenario:

In catalog item, we have a variable field which is reference field which gets the record from hardware table.

If we select any record by searching with serial number and click on the record, it will show the display name in the variable field.

But what is happening is that it is updating all the records with same display name with different serial numbers.

We need to restrict that; is there any way to restrict other.

Whether we can do anything with variable attribute field in variable form?

 

Please help on the issue. It's urgent.

 

Regards,

Joyal Robert

 

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Joyal Robert 

how is the record getting updated? Please share the script

Is it after catalog form submission? Is it from workflow or some flow?

If yes then you can get the variable value which is sys_id and directly query the hardware table with this sysId.

There will be only 1 record and you can update only that

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Hi @Ankur Bawiskar 

 

Actually, there is no flow for the catalog. Yes, it is happening after catalog item submission.

Where do we query? In the variable attrible field or Reference qual