Worfklow - Convert Number into String

Hello everyone,

I have an account attribute defined as a string in my account schema, but it is actually a number, as you can see. I want to use it in my workflow, but I am experiencing this issue. Do you know how I can avoid this?

image

image

I tried using defineVariable with various operations, but none worked.

Thank you

Hi @ragavi
Can you try to read this in a variable, and do a concatenation operation with whitespace, and then trim the whitespace?

Post that, you can use the variable. Let me know if that works.

Hi @sushantkulkarni,

I tried, but I got an empty response. I also tried concatenating with ā€œ_test,ā€ but I’m only getting this:

It seems like it is not recognized as a string because it is a number.

And this is what i put in the defineVariable :

{
  "name": "id",
  "description": "",
  "transforms": [
    {
      "id": "sp:transform:concatenate:string",
      "input": {
        "variableB": "\"_test\""
      }
    }
  ],
  "variableA.$": "$.getAccounts.accounts[?(@.sourceId == 'x')].attributes.id"
}

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