Convert DEEPLINKS to Full/External URLs for Use in PDFs/Emails or Pre-Filled Form Links

DEEPLINK expressions like LINKTOFORM() return a ‘deeplink’ to an app view, but not a full browser URL.

These links won’t work in an email or PDF. They only navigate within/between AppSheet apps.

I needed a way to generate full-URLs for use in an email body, and take values from a row in a secure app to generate pre-filled links to a form in a public app.

Basically, LINKTOFORM(Pre-filled values) but with a valid, full-URL that could be used in an email.


I’ve broken the formulas down into separate Virtual Columns to make it easier to read.

[AppLink] =LINKTOFORM()

3X_7_e_7eb82aeb16c1bd19f2043d3304dca1efe9132878.png

[ApprovalLink] =

"https://www.appsheet.com/start/" & 
{PUBLIC_APP_ID}#appName={PUBLIC_APP_NAME} &
[AppLink]

…well, almost.

I found that adding a deeplink to the end of the appsheet.com/start/ link was resulting in two #'s in the URL and two instances of the App-Name. So I had to swap the second # for an & symbol.

The above format is to show the structure of the URL more clearly. The exact formula is:

SUBSTITUTE(
"https://www.appsheet.com/start/{PUBLIC_APP_ID}#appName="&[AppLink],
"#control","&control")

This results in a full URL that works in emails, PDF, texts, etc., and can pre-fill the form link with row data.


I also discovered that the LINKTOFORM() deeplink string uses the parameter defaults to pass a JSON object of the pre-filled values.

I took the result of a LINKTOFORM() deeplink and used a URL Decoder to read the raw parameter value:

So it looks like this could also be done using "...defaults=ENCODEURL({JSON}) " instead of LINKTOFORM().

11 7 3,258
7 REPLIES 7

Steve
Platinum 4
Platinum 4

3X_0_8_087fe0fed00523852d82a6708e855347d189bfc0.png

3X_5_4_5498ae541c4b518a669b97fd9f28f668bb5b371c.png

@Steve, Thanks! I did not know about <<ROW_WEB_LINK>>/<<ROW_WEB_URL>>!

They would not work in this case though, because I needed the DEEPLINK to create a new record in another app.

Similarly, the <<_APPID>> and <<_APPNAME>> in my use-case would not work because they return values from the current app, and my use case is sending links from one app to another-- so you have to insert the value explicitly, or store it elsewhere in the app.

I’m glad you posted this though. I could simplify the expression a lot further if it was in the same app and was a link to View/Edit/Delete, instead of Add.

Hi @GreenFlux,

I am doing exactly what you have mentioned in your post. It is working for use the link is generated in one app but the user enters another app with out the record existing in it. It has and edit in the link, pointing to a form view and data resides in a MySQL db.

@James_McFarlane, are you saying you were able to achieve the same full-URL between apps using the <<ROW_WEB_URL>> to go to a new form?

Or are you stating that you had to use the same workaround as me to get this result?


If you have this working with <<ROW_WEB_URL>> for adding new rows, could you please post the expression?

Hi

This what I am using:

> <a href="<<CONCATENATE(“https://www.appsheet.com/start/<<app id>>?refresh=1&wipe=1”,LINKTOFORM(<<VIEW NAME>>,“solicitud_id”,[QUESTION1],”nombres”,[QUESTION2],"cedula_pasaporte”,[QUESTION3]))>>">Dar click</a>

Great post @GreenFlux, exactly what I was looking for just now. By the way, did you ever end up using this:

I toyed around with it but I haven’t used it in any production apps yet. It seems like it might be more useful if the data was already stored in JSON, like if you were generating LINKTOFORM() links from some other platform. I could see using Integromat or some webhook tool to send users from another platform to a prefilled AppSheet form.

What did you have in mind for it, @Marc_Dillon?

Top Labels in this Space