You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to refer to a custom field of the type menu in PHP

Received Response
25
Views
3
Comments
edited Apr 28, 2020 6:48PM in Customer Portal 3 comments

Summary

How to refer to a custom field of the type menu in PHP

Content

Hi there,

I am having a problem to update a CUSTOM FIELD of the type MENU
Can anyone tell me how to refer to this field correctly?
I've tried the following 3 syntaxes with no success:

$gender=$_POST["Incident_CustomFields_PatientInfo_Patient_Gender"];

$incident->CustomFields->PatientInfo->Patient_Gender = $gender; 
ERROR 500

-OR-

$incident->CustomFields->PatientInfo->Patient_Gender_Menu = $gender; 
​ERROR 500

-OR-

 $incident->CustomFields->PatientInfo->Patient_Gender->Patient_Gender_Menu = $gender;
No error - response 200 Ok but not is written to the database

$incident->save(RNCPHP\RNObject::SuppressAll);

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!