Certainly.
I feel like there is something obvious I am missing which is why i cannot work it out.
This is copying the object from console.
[
{
“lat”: 46.7218939,
“lng”: -117.0107857
}
]
Certainly.
I feel like there is something obvious I am missing which is why i cannot work it out.
This is copying the object from console.
[
{
“lat”: 46.7218939,
“lng”: -117.0107857
}
]
Thank you. Let’s simplify the logic and assign a static object to the “testplace” property in the form’s data model. Does it work as expected then?
Do you mean if we just create an object with a text entry for the 2 properties? That will work.
Its the getting the custom code output into the data model which I cannot work out.
Static numeric values assigned to the properties. I just want to Exclude the custom code for now to make sure everything else works.
Yea if i do something like this
It works as I would expect it to.
And can use testplace.lat in update-form data and it shows via the data model
This is different than the print output. In the output the values are numeric.
Sorry.
But yes, works correctly as expected and displays in the text fields that have the data model like testplace.lat.
The problem is making the output from custom code an object in data model and i cannot work out how to do it :S
Could you please let me know your app Id and the name of the page with that logic? Also, please specify where exactly the “on change logic” is.
Regards,
Mark
in addition, how do you handle a case when the testplace
is undefined? for instance when the custom code returns an empty list
you can test it by assigning null
instead of create object
block
Sure thing, thanks for the help
ED1CB1A1-6AB3-F2FD-FFC4-571D7D78C600
page “mapobject” in crm container
Logic in on change event:
address-input
Autocomplete Google Places
/ Page Panel / main / crm-content / update / update-form / form-table / form-main
Also there should not be a time when the place data does not exist. as it will only do the custom code when an address is selected in the autocomplete google places address so there will always be a result (unless the code fails i guess.) but can handle that with some logic if required
I feel like im going crazy now. i swear I had a similar setup in earlier and it was just giving me errors. Yes can confirm it is now populating as I expect it to! Thank you very much for all your help on this. Much appreciated.