You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having trouble getting things to come out correctly in my JSON with using this CF. I was getting things like this in my JSON: {“options” : [ “[John Doe, Jane Smith]” ]}
When what I want is: {“options” : [ “John Doe”, “Jane Smith” ]}
I can modify the CF to get what I am after, by adding some escaped quotes, but I’m curious if anyone else has run into this before. Am I using it wrong? Here is an example of my usage: JSONSetElement ( "{}" ; "options" ; JSON.ArrayFromRelated ( Related_TO::FieldName ) ; JSONString )
If I try to use JSONArray as the last parameter, I get this: {"options":[]}
Looking at the 2 tests for this function, the one that references Related::Item doesn't seem like it would actually be a useful/valid result, if the items aren't quoted.
Test: JSON.ArrayFromRelated ( Related::Item )
Result: [apple,orange,plum\rbanana]
I would expect this to be a more useful/valid result: ["apple","orange","plum\rbanana"]
Maybe it is only meant to be used with numbers or objects, not strings?
The text was updated successfully, but these errors were encountered:
Thanks for the validation that I'm not [completely] crazy.
Do you think this should be a change to the existing function, or a new CF in the mix?
For my purposes, I have just added a new version, that I called JSON.ArrayFromRelatedText ( Field )
Calculation:
"[ \"" &
Substitute(
List ( Field ) ;
"¶" ; "\", \""
)
&
"\" ]"
I'm having trouble getting things to come out correctly in my JSON with using this CF. I was getting things like this in my JSON:
{“options” : [ “[John Doe, Jane Smith]” ]}
When what I want is:
{“options” : [ “John Doe”, “Jane Smith” ]}
I can modify the CF to get what I am after, by adding some escaped quotes, but I’m curious if anyone else has run into this before. Am I using it wrong? Here is an example of my usage:
JSONSetElement ( "{}" ; "options" ; JSON.ArrayFromRelated ( Related_TO::FieldName ) ; JSONString )
If I try to use JSONArray as the last parameter, I get this:
{"options":[]}
Looking at the 2 tests for this function, the one that references Related::Item doesn't seem like it would actually be a useful/valid result, if the items aren't quoted.
Test:
JSON.ArrayFromRelated ( Related::Item )
Result:
[apple,orange,plum\rbanana]
I would expect this to be a more useful/valid result:
["apple","orange","plum\rbanana"]
Maybe it is only meant to be used with numbers or objects, not strings?
The text was updated successfully, but these errors were encountered: