How to populate Final output in one variable based on two form input values on catalog form

raj99918
Tera Contributor

Hi

 

I have one catalog form having two variables called Input1 and Input2 based on these two values need to populate respective value on FINALOUTPUT variable. If combinations are less numbers I would have go with catalog client script with add and remove methods to populate but I have around 800 combinations to populate this final output What will be easiest solutions for this one ?

 

Thanks

9 REPLIES 9

Ankur Bawiskar
Tera Patron
Tera Patron

@raj99918 

what does those 2 input variable have?

Since the final variable might have 800 combinations, best way is to create a custom table to store those combination value and then use Reference type variable for 3rd variable.

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 Thanks for the reply. Those two input variables having 40 choice values each based on these two combinations need to populate that final output(This Final output just have 30 values based on other 2 inout values these needs to populate) value

@raj99918 

so 3rd variable will be auto populated based on other 2 then you can have it as text type variable

Then use onChange + GlideAjax and handle the IF ELSE logic in script for different combinations and then return the value, then store in 3rd variable

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

@Ankur Bawiskar Writing if else for 800 combinations its little bit complex Is ther any other way Sir ?