I am having difficulty setting a variable from a response to a Data API call (FMS17) with PHP.
The difficulty relates to a value from a related table, examples and outcomes below after setting curl options :
$appts_available = curl_exec($c_appts);
$display_appts = json_decode($appts_available);
$message_appts = $display_appts->messages->code; //returns '0' ok
$RecordUUID = $display_appts->response->data->fieldData->RecordUUID; //this was ok
$recordId = $display_appts->response->data->recordId; //this was ok
$namereference = $display_appts->response->data->fieldData->OBUsers_Events::NameReference;// NO GOOD
*** Agghhh! $namereference fails (note that the key is from a related table).
- The field "OBUsers_Events::NameReference" is displayed on the layout that was specified in the "_find" url
- The relevant key/value pair was returned as expected in $appts_available
- I could get this value using Postman, but not in my php page.
Can anyone help me with the correct syntax for this situation (getting value from related table)?
Any tips would be much appreciated.