PricingBlog

Conditional Concatenation

  • toddledoodle-1276562797865734275

    m

    1 year ago

    Hello, I want to concatenate 3 API string items together. However, the last item does not always have a value. If it does, I need to also add a colon ":" before it. I use the IF formula to check if the 3rd item is an empty string using equals, and if it is not, then I concatenate a colon + the item. However, it didn't return the desired result. What did I do wrong?
    1276562798218051666-Screenshot_2024-08-23_at_11.18.27_AM.png
  • lucasg-1276575629118279813

    Lucas G

    1 year ago

    When 3rd item is empty, does it come in as null or as an empty string?
  • If it's an empty string, just leave the equals empty
  • You also don't need the Not node in there but that's not as big a deal
  • toddledoodle-1276585397777858560

    m

    1 year ago

    @Lucas G mmm, tried that, still doesn't work. The 3rd item shows up as "" in the API if it is empty. What else should I check?
    1276585397589118986-Screenshot_2024-08-23_at_12.51.44_PM.png
  • lucasg-1276585678246903859

    Lucas G

    1 year ago

    Just leave it empty, no
  • toddledoodle-1276586324022788096

    m

    1 year ago

    @Lucas G Gotcha!! I removed the one in the If>Then field, didn't see the one in the equal...and it works!! Thank you so much!!!
    👍1