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:

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