Reference vs lookup select box
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2015 02:34 PM
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,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2015 03:49 PM
This is refering to 'Reference' fields. Variables act different than table fields.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2015 03:54 PM
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,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2015 04:02 PM
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