Furthermore, I do something similar for questions. For each question I want get the checklist property from the section. Question.section works, however this:
question.section.checklist (also including .ID) returns undefined. The question is in context.
I have already worked around the issue and found a solution, but I would expect these references to resolve correctly… I seem to remember doing this with success earlier? Is this a known limitation in functions, or am I missing something about how nested references are handled in Services?
Yes, sure. I have a set of questions and a service variable Map Questions (string). For each question I write to the service variable, a JSON-stringified array to the service variable.
The Map Questions service variable then looks like this: [{"newChecklistReferance":"6928884dc64007141a06a2ba","newChecklistId":"Value: undefined"},{"newChecklistReferance":"6928884dc64007141a06a2ba","newChecklistId":"Value: undefined"},{"newChecklistReferance":"6928884dc64007141a06a2ba","newChecklistId":"Value: undefined"}]
This shows that the function can retrieve question.checklist, but not question.checklist.id when running in a service. However, in the client I can access both question.checklist and question.checklist.id without issues when using a similar structure.
Is this expected behaviour? I get the same result (undefined id) when using the same function to log to console (in the service).
Your setup seems to work fine when I try to recreate it (same behavior as apps).
Just to rule it out - You don’t happen to have a reference data source from your QA Checklist Questions to the QA Checklist data source and that the checklist with ID 6928884dc64007141a06a2ba is not present in that data source?
When trying to recreate your case your setup works as expected, but I’m able to reproduce the same behavior if I set up a reference data source from QA Checklist Question to the QA Checklist and making sure that the checklist object for the questions I’m processing is not in that data source. When using the function properties from your example then question.checklist gives the id as it’s a property of the question in context, but question.checklist.id is undefined (as expected as it’s a property of the checklist).
If this is not the case, let me know and I’ll try to do some more digging.