Help

Re: URL builder question: Clean up URL field and append with querystring field

Solved
Jump to Solution
1708 1
cancel
Showing results for 
Search instead for 
Did you mean: 
airballer86
7 - App Architect
7 - App Architect

@Sho answered my first URL audit Find formula question

My followup question/challenge:

I want to clean up (not just identify) the {Link URL} field and join it with {reftag} field:

Add

  • missing https://
  • and/or missing "s" in http://

Remove

  • invalid characters; e.g., ' §
  • the following querystrings:
    • ?ref= 
    • ?ref_=
    • &ref=
    • &ref_=

Then join two fields ({Link URL} & {reftag}) based on logic:

  • If {Link URL} Does NOT contain '?' append {Link URL} with '?ref_=' & {reftag} field
  • If {Link URL} contains '?' append {Link URL} with '&ref_=' & {reftag} field

Here is the original solution used to callout errors in the {Link URL} field:

 

IF(
  {Link URL},
  IF(
    OR(
      FIND("http://", {Link URL}),
      NOT(FIND("https://", {Link URL}))
    ),
    'missing https, '
  ) &
  IF(
    FIND("http://", {Link URL}),
    'missing https, '
  ) &
  IF(
    FIND("ref=", {Link URL}),
    'remove ref=, '
  ) &
  IF(
    FIND("ref_=", {Link URL}),
    'remove ref_=, '
  ) &
  IF(
    FIND("'", {Link URL}),
    'remove apostrophe, '
  ) &
  IF(
    FIND("§", {Link URL}),
    'remove §, '
  )
)

 

 

 

 

11 Replies 11
Arthur_Tutt
8 - Airtable Astronomer
8 - Airtable Astronomer

@airballer86 Couple ideas to try 

https://www.loom.com/share/58320af793454079999b5ed14a2e3704

 

If that's still not working can you screenshot your table? Need to check all field names got converted properly

@Arthur_Tutt It's working now! User error on my part; I did not capitalize the RL in the variable name originalURL. Thank you so much for your solution, and introducing me to Loom! I do wish there was a way to give your solution a SuperKudos!