I always struggle, how do I pull dynamic field ref...
# general
c
I always struggle, how do I pull dynamic field references into this formula? '{"name":"{custrecord_gp_finish_item}", "age":30, "car":{custrecord_gp_user_loc}}'
t
Where is this formula located?
c
• It's just a default formula in a custom field
so it would be non stored, reading values from other fields on the same custom record to be dynamically producing that json blob
m
Have to add a || before and after the fields to concavenate it all together
Also a single quote before and after the ||
Each dynamic field should be ‘|| {fieldID} ||’
In the formula
c
{"name":"'||{custrecord_gp_finish_item}||'", "age":30, "car":"'||{custrecord_gp_user_loc}}||'"}{"name":'||{custrecord_gp_finish_item}||', "age":30, "car":'||{custrecord_gp_user_loc}}||'}
I get this error
Your formula has an error in it. It could resolve to the wrong datatype, use an unknown function, or have a syntax error. Please go back, correct the formula, and re-submit.
m
Put a single quote before and after the whole thing
Also you have double curly braces after some of you fields
'{"name":"'||{custrecord_gp_finish_item}||'", "age":30, "car":"'||{custrecord_gp_user_loc}||'"}{"name":'||{custrecord_gp_finish_item}||', "age":30, "car":'||{custrecord_gp_user_loc}||'}'
This worked for me