How to reuse choice lists on variables?

peterraeves
Mega Guru

I created a choice list on a variable on a record producer and now I want to reuse that choice list on another variable. How can I do that?

I tried to do 'Lookup select box' and point to the question_choice table. This gives the correct list, but the order is not correct. So how should I be able to order them like the original as well?

It seems that the ORDERBY statement does not work in reference qualifiers either...

1 ACCEPTED SOLUTION

peterraeves
Mega Guru

This is what I did in the end and it works like a charm.



Image 1.png


View solution in original post

8 REPLIES 8

hai ananthagowraram,



i'm creating a choice list in record producer such as category and subcaterory which is from incident table. First   i'm trying to query from choices from choice list(sys_choice), but i don't now which i have to query could u please help me ??



function onChange(control, oldValue, newValue, isLoading) {


    if (isLoading || newValue == '') {


          return;


    }




    //Type appropriate comment here, and begin script below


    var   catchoice= new GlideRecord("sys_choice");


    catchoice.addQuery("category",false);


    catchoice.addQuery("category",newValue);


}


Sharique Azim
Kilo Sage

Hi Peter,



Just for the sake of future reporting purposes, I would have copied the variable and its question in a new variable .


peterraeves
Mega Guru

This is what I did in the end and it works like a charm.



Image 1.png


This is great - helped me a lot, saved me a bunch of duplicative work.