Jsonata in global environment variables with reference

Hello,

i want to use jsonata expression within the released function "Global Environment Variables".
The jsonata contains a logical function, which checks if a environmental variable exists. If not, it sets a default value, which is also stored within the Global Environment Variables section. I had trouble getting this to work. Therefore i decided to shorten the jsonata and observed that there is a functional difference between flow and global environmental section.

It seems, that i can´t reference inside a variable within the "Global Environent Variables" section.

Here is an example:

  1. In the global env section "globEnvWriteTopic" references "defWriteTopic"
  2. Reference the "globEnvWriteTopic" in an inject node
  3. Payload is empty

It works, if i´m using this reference in the flow section.

Is that an issue of the new release?

Best regards,

Martin

Variables are not surrounded by quotes. If you wanted to reference a env var then the $env($env("varname")) would be more correct.

The order you create them in the Global env variable editor may be of importance to.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.