Syntax to use URL in function
case "Seats, BEV":
"wattev2buy review & compare the " + 'No-Doors' + ", " + Seats + " seat " + 'Model Year' + " " + " " + "<strong><a href=" + html(WEV_brand_link) + ">" + html('Marque Brand') + "</a></strong>" + " " + 'WEV Model Name' + " pure electric vehicle (BEV) " + " " + text('Body-style') + " helping you to find the best EV for you. "
How can I use the above function to print the url where
WEV_Brand Lik = https://wattev2buy.com/electric-vehicles/mercedes-benz-electric-vehicles/
and
Marque_Brand is "Mercedes"
So in the text result the text must be
<strong><a href="https://wattev2buy.com/electric-vehicles/mercedes-benz-electric-vehicles/“>Mercedes</a></strong>
6 replies
-
This should get you there. I used variables for the field names and note the number of quotes for the link. The entire string needs to go into the
html()
function.let NoDoors := "XXX";
let Seats := "XXX";
let ModelYear := "XXXX";
let startString := "wattev2buy review & compare the " + NoDoors + ", " + Seats + " seat " + ModelYear + "
";
let WEV_brand_link := """https://wattev2buy.com/electric-vehicles/mercedes-benz-electric-vehicles/""";
let MarqueBrand := "Mercedes";
let WEVModelName := "EQ";
let Body_style := "Coupe";
let htmlString := "<strong><a href=" + WEV_brand_link + ">" + MarqueBrand + "</a></strong>";
let endString := " " + WEVModelName + " pure electric vehicle (BEV) " + " " + Body_style + " helping you to find the best EV for you.";
html(startString + htmlString + endString)
-
htmlString
should really behttpString
-
Thanks Sean, unfortunately it gives me the same result as I had. My result is from a switch statement. See attached image. I need to export the result as a text string via zapier to mysql so the string must show as a url string, currently it show the result of html code.
-
So the result I from the switch statement need must look like this:
wattev2buy review & compare the 4-door, 5 seat 2019 <strong><a href="https://wattev2buy.com/electric-vehicles/mercedes-benz-electric-vehicles/“>Mercedes</a></strong> A250e L 4Matic PHEV plug-in hybrid electric vehicle (PHEV) Sedan helping you to find the best EV for you.
Not this:
wattev2buy review & compare the 4-door, 5 seat 2019 Mercedes A250e L 4Matic PHEV plug-in hybrid electric vehicle (PHEV) Sedan helping you to find the best EV for you.
-
Figured out my mistake, I was using a rich text box instead of plain text
-
Looks like you worked it out. The
html()
function renders CSS and HTML so if you just want the unrendered string don't use that function.
Content aside
- 4 yrs agoLast active
- 6Replies
- 1501Views