- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2017 01:56 AM
Hey guys!
Hopefully someone has better understanding of this then I have.
I have a table 'DNS Records' that has a bunch of fields, where these are the important ones I would like to retrieve using REST/ Table API:
- Domain (Reference-field "u_domain", displaying records from Domain table)
- - Domain in turn has a field "name" which is a string
- IP Address (Reference List-field "u_ip_address", displaying records from the IP Address table)
- - IP Address has a field "ip_address" which is also a string
When in REST API explorer I query my DNS Records table and enter "u_domain.name" in sysparm_fields.
The returned value is the domain name (=string) as opposed to if I would only query for "u_domain", which would of course return the referenced records sysid as well as a link.
So far so good.
Now in my head the same should apply if I have a Reference List-field.
If I enter, in sysparm_fields, "u_ip_address.ip_address" (note: a string) nothing is returned. In other words, there is seemingly no dot-walking possibility on a Reference List-field.
If I instead enter "u_ip_address" it does return the sysid of a IP Address but in another format then it typically would for Reference-fields - just the sysid.
Sure, there is an inherent difference between a single Reference field and a Reference List-field but it's really driving me nuts that I'm seemingly not able to dot-walk the records in a Reference List-field in the same way as a single Reference field. Or am I missing something?
I do have an alternative solution to what I'm trying to achieve (using database joins) but I really want to understand this limiation.
Hoping it's only my knowledge that is limited and that someone can push me in the right direction .
Refer also to the attached images.
RB1: The response body when sysparm_fields = u_domain.name, u_ip_address
RB2: The response body when sysparm_fields = u_domain, u_ip_address
u_ip_address.ip_address returns nothing hence no screenshot.
Cheers,
Tarik
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2017 02:12 AM
Hello Tarik,
You cannot dot walk in a GlideList. Please go through the below link which mentions the limitations of GlideList in section 3.4
Also if the field ip_address on your IP Address table is set as a Display Value, then you can pass in sysparm_display_value=true as a URL parameter and get the display value instead of trying to dot walk
Thanks,
Kannan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2017 02:12 AM
Hello Tarik,
You cannot dot walk in a GlideList. Please go through the below link which mentions the limitations of GlideList in section 3.4
Also if the field ip_address on your IP Address table is set as a Display Value, then you can pass in sysparm_display_value=true as a URL parameter and get the display value instead of trying to dot walk
Thanks,
Kannan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2017 02:41 AM
Cheers Kannan! Setting that certain field to be the display value and sysparm_display_value=true actually solves in entirety the issue I was faced with.
Didn't event cross my mind to do that.
Also thanks for the read. I was really hoping I was missing something about dot-walking in a List-field but I guess I'll leave it at List being a very bad field type in that regards.
Thanks again.
/Tarik