Excel issue in mrvs multirow variable set select box filed

keshav77
Tera Contributor

Hi  All,

 

I am create one catalog in that catalog I am getting data through excel sheet to MRVS  of catalog  in a MRVS  variables there are so many select box variable but when value enter in the those MRVS  through excel sheet it show's it on own option in that select box variables for example box having  option a b c.

And data enter through excel sheet it start showing like  a b c a  below is example screenshot put option is already there but if data is coming form excel sheet it show  one more put option

 

 

keshav77_0-1746873098115.png

 

 

 

1 ACCEPTED SOLUTION

J Siva
Tera Sage

Hi @keshav77 
Ensure that the value in the Excel sheet matches the choice value in the catalog variable.

For ex: If the variable choice value is put, then in the sheet the value should be put not PUT.

Regards,
Siva

View solution in original post

7 REPLIES 7

pratikjagtap
Giga Guru

Hi @keshav77 ,

 

This happens because data imported from the Excel sheet is treated as literal values, and if a value (like "PUT") in the Excel sheet does not exactly match one of the predefined choices in the select box, ServiceNow:

  • Accepts it as a new value temporarily, and
  • Displays it alongside the original choices — even if it's a duplicate (like a different casing, extra space, etc.).

Solution:

1. Clean Excel Data Before Importing:

  • Make sure all select box values exactly match the options defined in the catalog item.
  • Remove extra spaces or case mismatches (e.g., use TRIM() and UPPER() in Excel).

2.Validate Inputs in Script Include or Flow:

  • Before inserting the MRVS data, run a check against allowed values.
  • If a value doesn't match, you can:
    • Skip it,
    • Replace it with a default, or
    • Log it for review.

4.Use a Reference or Data Source-Backed Select Box:

  • If possible, make the select box a reference field or pull options dynamically from a table or script.
  • Then enforce input constraints by comparing imported values to that source.

4.If you’ve already uploaded data and want to clean the duplicate values:

var validOptions = ['GET', 'POST', 'PUT', 'DELETE', 'OTHER'];
var inputValue = current.variable_name.trim().toUpperCase();

if (!validOptions.includes(inputValue)) {
current.variable_name = ''; // or set to a default value like 'GET'
}

 

If my response helped, please hit the 👍Thumb Icon and accept the solution so that it benefits future readers.

 

Regards,
Pratik

J Siva
Tera Sage

Hi @keshav77 
Ensure that the value in the Excel sheet matches the choice value in the catalog variable.

For ex: If the variable choice value is put, then in the sheet the value should be put not PUT.

Regards,
Siva

Ankur Bawiskar
Tera Patron
Tera Patron

@keshav77 

share how did you map the excel sheet to MRVS?

did you simply load the choices to select box variable of MRVS?

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

keshav77_0-1747122468038.png

keshav77_1-1747122531960.png

@Ankur Bawiskar  here is my script I am calling data from script include to client script I am write onchange client script on attachment variable which upload data in mrvs