- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2016 01:48 AM
Hi
I am accessing multiple tables by dot walking, but getting empty value when i dot walk the second time. For example i have written a Bussiness
Rule on sys_import_set_run in that i am accessing the sys_import_set table like
current.set.getRefRecord().getValue('state');
but when i try to access the sys_data_source table like
current.set.getRefRecord().getValue('data_source').getRefRecord().getValue('u_email_address');
i get the empty value
So the question is can i dot walk and get the values of multiple tables? If yes please guide me how to correctly do it..
Regards
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2016 03:02 AM
Hi John,
Dot-walking is really quite simple. You do not need to call methods, just use a reference field to go from one place to another.
current.set.state; // get the state of the import set
and
current.set.data_source.u_email.address;
are two examples of what you tried to do above.
Be aware, if one of the intermediate values are null, (for example data_source, in the second example) you will get a null pointer exception error thrown in the log. Always check your variables to ensure they contain a valid value before dot walking.
// Better
var state = '';
if (current.set)
state = current.set.state;
Good luck!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2016 02:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2016 05:00 AM
Thanks harsh for your time the article was helpful
Regards

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2016 03:02 AM
Hi John,
Dot-walking is really quite simple. You do not need to call methods, just use a reference field to go from one place to another.
current.set.state; // get the state of the import set
and
current.set.data_source.u_email.address;
are two examples of what you tried to do above.
Be aware, if one of the intermediate values are null, (for example data_source, in the second example) you will get a null pointer exception error thrown in the log. Always check your variables to ensure they contain a valid value before dot walking.
// Better
var state = '';
if (current.set)
state = current.set.state;
Good luck!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2016 05:02 AM
It took me some time to understand , thanks Chuck for your suggestion ...
Regards