Reference vs lookup select box

ryadavalli
Tera Expert

Hi,

I am trying to make a field look up select box variable type. Can I do the dot walking like current.variable_pool.reference_field.fieldnames?

The lookup selectbox gives us a nice look way than reference, but reference field has a advantage of   dot walking which I need. Is there any alternative?

Thanks,

7 REPLIES 7

This is refering to 'Reference' fields.   Variables act different than table fields.


I tried Terri, I wanted to the dot walking that's why I was making the fields reference type, but drop down looks good and gives user the selections available, that's why I was trying to see if I can do dot walking with lookup select box. Do you have any siggestions or the only option I have is to do reference.



I want to do current.variable_pool.dot walk to the fields.



Thanks,


You have 2 options that I know of:


1) Use the Refernce variables; then you can dot walk


2) Use a Lookup Select Box with the 'value' field set to sys_id; then in your script


                var rec = new GlideRecord('table_name');


                  rec.get(current.variables.variable_name);


                  Use 'rec.' to dot walk to your fields