Using TOTEXT on Objects

Hi support team,

I’m trying to convert a nested object variable to a string (in JSON format) for passing to an external API via a connector. I appear to be able to pass an object list to the TOTEXT() function in the Expression Editor to achieve this goal but unable to pass a single object to the function.

Is this the intended behavior, am I missing something critical that would allow me to do this, or is this an unintended bug? My current workaround is to populate the object variable, push it onto an array (so its a 1-object list), use TOTEXT(), then trim the [ and ] from the ends of the string. (Thank you @Austin for showing my that trick) The workaround isn’t terribly arduous, so mostly asking out of just curiosity.

Thanks!

Hi @pgabrys

you are right. object variables are still not available in the expression editor. This ist not only true for the TOTEXT() function.
Maybe the development didn’t see any usecase, since there is no object related function available.
However I find making it a text very useful as well :wink:

You can only workaround it like you did or grab each parameter of the object one by one.

Hey @thorsten.langner,

Thank you for confirming my suspicion. You make a good point that since Tulip doesn’t have any object functions, its likely low priority. But most of my external connector calls love an object input, so I’d love to see it in the product someday. I’m glad I have a good and easy workaround right now. :slight_smile: