Forums

Edit Custom People Field

I'm trying to find the documentation on editing custom people fields. 


1 person has this question

Hi Chris,


Thanks for the email.


Can I just check if you're wanting to edit the custom field itself, or edit the value of a custom field in someone's profile?


If you're wanting to edit the custom field, at this stage this isn't possible. 


If you're wanting to edit the value of the field of the persons profile you can use a people/customFields/getAll request to get information such as this.


 

{
    "generated_in": "0.014",
    "status": "ok",
    "custom_fields": {
        "on_this_page": 3,
        "page": 1,
        "per_page": 3,
        "total": 3,
        "custom_field": [
            {
                "id": "67621d54-38eb-11e0-8ebe-bea1eec205d1",
                "name": "Ministries",
                "type": "select_multi",
                "values": {
                    "value": [
                        {
                            "id": "6e38c70e-38eb-11e0-8ebe-bea1eec205d1",
                            "name": "Golf Guys"
                        },
                        {
                            "id": "5788c70e-54eb-11e0-3ebe-bea2eec205d5",
                            "name": "Tea Troops"
                        }
                    ]
                }
            },
            {
                "id": "6e38c70e-38eb-11e0-8ebe-bea1eec205d1",
                "name": "Allergies",
                "type": "text"
            }
        ]
    }
}

 

You should then be able to use this information to get the ID of the custom field you want to edit.


You can then use people/edit to edit the specific field. Your request would look something like this, if you wanted to specify the person was allergic to gluten for example. 

  

{
    "id": "7bcb4c7e-1008-11e3-b25c-fb2ff5416432",
    "fields": {
        "custom_6e38c70e-38eb-11e0-8ebe-bea1eec205d1": "Gluten"
    }
}

 

Hope this helps,

Stewart

Stewart:


Thank you thank you!


Correct, I'm not wanting to create a custom field but edit its value. I will implement what you suggested and try it. Looks straight forward enough. Thank you!


Chris


Login or Signup to post a comment