REST API Explorer - sysparm_fields from Parent

Jake Golden
Tera Expert

Hello,

 

I am currently trying to develop an API to capture parent information from a sc_task table. Is it possible to hard code sysparm_fields from the associated parent of the task?

 

For instance - I have a requested_for_date on my parent REQ and then on my sc_task table I have the information as request.requested_for_date to pull info from the parent. 

 

How can my API capture that field from the parent? 

 

thanks,

Jake

1 ACCEPTED SOLUTION

Dan Ostler
Tera Guru

I'm not sure that I entirely understand your question. If you're asking how you can specify a parent column in the sysparm_fields parameter you can specify it as you outlined:

 

sysparm_fields = 'request.requested_for'

 

View solution in original post

4 REPLIES 4

Dan Ostler
Tera Guru

I'm not sure that I entirely understand your question. If you're asking how you can specify a parent column in the sysparm_fields parameter you can specify it as you outlined:

 

sysparm_fields = 'request.requested_for'

 

Hi Dan,

 

thank you for the quick reply.

 

I have tried writing in request.requested_for_date in the sysparm_fields for my API, but no success. 

Can you verify which table the requested_for_date column is on and the column name?

 

The reason I ask is because to my knowledge there is not an out of box column by the name of requested_for_date. If it is a custom column it will likely being with the 'u_' prefix.

Ah! Thanks for having me check that.. 

 

Column label was requested for date and my name was requested_date. There was my mistake!

 

Worked like a charm and I now have those fields added.

 

thank you,

Jake