Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Reordering of Variable Sets

surbhibarnw
Tera Contributor

Hi everyone, 

I have a requirement where two variable sets: "Shipping Information" and "Billing Information" are there. I need to show "Shipping Information" first if a user checks the checkbox "Ship to a different address" variable. And if "Ship to a different address" is unchecked then "Billing information" would be showing first.

 

 

1 ACCEPTED SOLUTION

YaswanthKurre
Tera Guru

Hi @surbhibarnw ,

 

To dynamically reorder variable sets like "Shipping Information" and "Billing Information" based on a checkbox ( "Ship to a different address"), this is only possible via DOM manipulation using a Catalog Client Script.

 

ServiceNow does not natively support reordering variable sets at runtime, but you can achieve the desired behavior with DOM manipulation, which is not a best practice and not recommended by ServiceNow.

 

Please mark this as helpful and correct if this answers your question.

 

 

Thanks,

Yaswanth.

View solution in original post

5 REPLIES 5

YaswanthKurre
Tera Guru

Hi @surbhibarnw ,

 

To dynamically reorder variable sets like "Shipping Information" and "Billing Information" based on a checkbox ( "Ship to a different address"), this is only possible via DOM manipulation using a Catalog Client Script.

 

ServiceNow does not natively support reordering variable sets at runtime, but you can achieve the desired behavior with DOM manipulation, which is not a best practice and not recommended by ServiceNow.

 

Please mark this as helpful and correct if this answers your question.

 

 

Thanks,

Yaswanth.

PrashanthR95946
ServiceNow Employee
ServiceNow Employee

Hi @surbhibarnw 

Maintain the lower order to shipping information variable set and using UI policy or client scripts you can show/hide the variable sets.

 

Thanks

Prashanth R

I have already tried this using UI policy but no luck.

Community Alums
Not applicable

Hello,

 

This is not possible to do. Variable set can't be reordered dynamically.

 

Best Regards,

Brahmjeet