Best way to extract URL parameters

FHLPC
New Member

I am setting up a new app to scan QR codes that have custom URL with parameters. This app is linked to google sheets.

The app is currently working, and properly scanning QR codes, and storing the info into a spreadsheet.

Now, we need to extract the URL parameters into separate columns

Here is a URL example: www.mysite.com?VAR1=one&VAR2=two&VAR3=three

Iโ€™d like to extract the 3 variables above, each one in itโ€™s own column

VAR1 | VAR2 | VAR3
one | two | three

Whatโ€™s the best formula to extract URL parameters? MID() ? FIND()?

0 4 1,040
4 REPLIES 4

Steve
Platinum 4
Platinum 4

AppSheet is really not well designed for parsing.

INDEX(
  SPLIT(
    INDEX(
      SPLIT(
        [Url],
        "VAR1="
      ),
      2
    ),
    "&"
  ),
  1
)

Thank you, Iโ€™ll try the above.

Would be better to setup google sheet formulas to automatically extract variables from the URL?
Otherwise, do you have any other suggestions? Such as setting up a workflow or similar automation (with external providers, like MS Flow or similar)?

Such as : when a new row is added > extract VAR1, VAR2, VAR3?

If I had a need to extract URL parameters, and the simple parsing I suggested above wasnโ€™t sufficient, I would next try to do it with formulas in my spreadsheet (probably using Google Sheetsโ€™ REGEX functions)โ€“with the understanding that processing done by the spreadsheet wouldnโ€™t occur until the app syncs.

Iโ€™m afraid I have no experience with external providers, so I have no advice to offer there.

I know this is an old post, but wondering, is there a way to refer to that [Url] from the current page? 

Top Labels in this Space