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.
"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")
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().
<<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?