Magic ETL

Magic ETL

Beastmode. How to create a CONCAT URL with several variables?

Want to build the following link on a card


=CONCATENATE("https://b2b.officedepot.com/rest/ODServices/api/product/priceAvailability/xml?zipcode=",`CONSTANT1`,"&sku=",`COLUMN`,"&billto=",`CONSTANT2` )


The URL is a constant as well as "CONSTANT1" and "CONSTANT2", but also need "COLUMN to change depending on the value of the column.


I can't get to build this with the CONCAT formula. Please, help!

Tagged:

Answers

  • Hi @Kervin

    Your code should work to pull the value from the COLUMN column. If you're needing to select from a different column name based on certain criteria instead of COLUMN then you could utilize a CASE statement inside your CONCAT:

    1. =CONCATENATE("https://b2b.officedepot.com/rest/ODServices/api/product/priceAvailability/xml?zipcode=",
    2. `CONSTANT1`,
    3. "&sku=",
    4. CASE WHEN THIS CONDITION THEN `COLUMN`
    5. WHEN OTHER CONDITION THEN `COLUMN2`
    6. ELSE `ELSE COLUMN`
    7. END,
    8. "&billto=",
    9. `CONSTANT2` )
    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • Member
    edited April 2022


Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In