Question

Can't update custom field w/ Number type

  • 6 December 2021
  • 2 replies
  • 33 views

Userlevel 3
Badge +4

I’m not sure what is going on here.

 

I’ve created a custom field (mautic_id). I marked it as Numeric.

Side note: I really wanted Integer here, its really weird its in floating point now, making equality checks not work.

Now, when I use the Copper API to update a lead, I fill in the custom_fields record

[
{
"custom_field_definition_id": 493229,
"value": "5gHHZRzXeZwAJVs5BfMS5E"
},
{
"custom_field_definition_id": 500315,
"value": 2
},
{
"custom_field_definition_id": 500333,
"value": "https://mautic...."
},
{
"custom_field_definition_id": 503591,
"value": 34483
}
]

but this is returned from the update:

[
{
"custom_field_definition_id": 493229,
"value": "5gHHZRzXeZwAJVs5BfMS5E"
},
{
"custom_field_definition_id": 497161,
"value": false
},
{
"custom_field_definition_id": 500315,
"value": 2
},
{
"custom_field_definition_id": 500316,
"value": null
},
{
"custom_field_definition_id": 500333,
"value": "https://mautic....."
},
{
"custom_field_definition_id": 502120,
"value": null
},
{
"custom_field_definition_id": 507768,
"value": null
},
{
"custom_field_definition_id": 508798,
"value": null
}
]

effectively, the ‘Numeric’ field vanishes, it never gets set. I get the remainder of fields back, and the string fields work etc.

 

Do number fields work differently somehow? Are they not settable? Is ‘1.0’ and ‘1’ the same for it? is the ‘.0’ required even if the value has no fractional part?

 


This topic has been closed for comments

2 replies

Userlevel 7
Badge +7

Hi @donbowman, I don’t know too much about the API so let me ping someone who does. Hang tight!

Userlevel 7
Badge +7

Hi @donbowman, this since it requires some troubleshooting so it’s best to work directly with our support team. I’ve submitted a ticket on your behalf. Our team will follow up with you via email.