META POST: Deep Links & URL Parameters

GreenFlux
Participant V

META POST: Deep Links & URL Parameters

This post is a collection of other posts and AppSheet support docs relating to Deep Links and URL Parameters. Please feel free to post links to additional tips below and I will add them to the main post.

Deep Link vs Deep Link Expression

Deep Link: Link to a specific app view. Can be to a single row, full table, filtered-set of rows, pre-filled form, etc.
Deep Link Expression: Formula that takes one or more inputs, and outputs a Deep Link.

The output is URL Encoded

3X_6_f_6f71eb3fe32d96e3f140036db4e064e8d7510bf5.png


URL Parameters

Deep Links form a complete link to a specific app view. They contain enough info to get you to the right view, but there are optional parameters that could be included to modify that view.

Below is a list of some common URL parameters with links on how to use each one.

&at=NOW()+1

Force sync when navigating to a view. (See last line of support doc)

&quickedit=true

Open a view in Quick Edit

&group=

Group any table view by any column without editing the view definition

&defaults=

Alternate method of pre-filling a form (instead of LINKTOFORM() )


Thanks to @Fabian for the idea, and to anyone who would like to contribute.
Please link to an existing post, or create a new post for your example. Iโ€™d like to keep this post as a collection of links, rather than go in-depth on any one tip.

20 44 9,648
44 REPLIES 44

The sync was/is the biggest game changer!

I just learned about quickedit=true, and just found group= a few days ago. I know there are more, and it would be great to have them all in one place!

Another one is fasttable, but I donโ€™t know how it would be useful to apply manually. Itโ€™s just a fallback when no other view applies.

Map views have all sorts of paramsโ€ฆ

Legit.

LINKTOFORM() was another huge boon as well; and itโ€™s baby brother the background record creation action type.

I still wish that we could โ€œlinktoformโ€ to an existing formโ€ฆ I wish we could add the record id peram to itโ€ฆ

???

LinkToROW([RowID], โ€œForm_Viewโ€)

???


If youโ€™re meaning you wish we could add data at the same timeโ€ฆ yeah.

But you can use other actions to change data before you open the record

I do this in many apps, as I typically have a column called [Form_Type] that I use to hold temporary flags which I use to based which columns should be shown or not.

For instance: โ€œNew_Whateverโ€ is something Iโ€™ll set the initial value to, then hide a bunch of stuff for the first time the record is made. I have another action that clears this flag, and then others that put other flags there based on the context I need to access the record.

Canโ€™t modify columns with linktorow
Hijacked threadโ€ฆ LOL

Hi, can you explain more about this?

@1111 I assume youโ€™re asking about the [Form_Type] column I mentioned:

I will create a new post about that in the near future, and link it here.

Thank you so much @GreenFlux for this thread. I knew you are the right person for that
I like to add some points.

Forced sync as mentioned in the support doc is not working for me.
You already added the โ€œ+1โ€

Zoom level in Map View

Preselect a row or a pin
You can use the combination of LINKTOFILTEREDVIEW() and โ€œ&row=โ€

Defaults
Can be used in every view type, not only form view.

refresh=1 and wipe=1

Forgot about that one! Another all star!

I found a new one to add to the listโ€ฆ
Table View already opened up to multiselect mode
linktoview(โ€œDocuments Filteredโ€) & โ€œ&selected=%5B%5Dโ€

Or:

linktoview(โ€œDocuments Filteredโ€) & โ€œ&selected=" & URLENCODE("[]")

It appears the selection list can be constructed thusly (untested):

URLENCODE('["' & SUBSTITUTE(FILTER(...), ",", '","') & '"]')

Yes thatโ€™s possible:

Here is another one using _currentLat= and _currentLng=.

A nice one from @LeventK

Is it possible to use a url to force the mobile app to refresh?
Or is it possible email/text a deeplink that is clickable (as in clicking on it will open the app, force refresh, and display a view)?

Hi @Behram_BASHIR yes this is possible. You can use a forced sync as mentioned above.

is the support doc still wrong because it has NOW() instead of NOW()+1?

Is there a way to set a view title through the URL?
This would be very handy for my case of setting a context sensitive title for a filtered table view deep link jump.

Is there an appsheet help doc about defaults= syntax?

Nope.

Nope.

Has anyone used Deep Links & URL Parameters in a Dashboard View?
Iโ€™m looking for a way to control what data is presented in the views that are part of a dashboard. Without the need of slices.

Im not perfectly sure what you want to achieve. This should be silly question to you (for you with deep knowledge about Appsheet), but the deeplink action with linktorow([Id], โ€œYourDashboardโ€) does not help you at all?

Hi @tsuji_koichi this is no silly question
I thought that maybe there are more parameters we could add.
Something @Marc_Dillon postet here:

But I see that actually there are no url parameters in an interactive dashboard view. The url is not changing when you select a row.

&search=

This one will enable the search bar with cursor ready to enter search text.

Fabian_Weller_0-1661844991591.png

&userfilters=

Sadly this won't open the filter window directly. But you can use it to pre-configure the filter. That's like LINKTOFILTEREDVIEW() but the user can see what kind of filter is active and can change it.
In this example I have a Number column called "Amount" and set the filter to 1:

&userfilters=[["attribute","Amount",{"start":1,"end":1}]]

Hi @Fabian_Weller I am not able to implement the &userfilters= . I tried but the data is not getting filtered although the filter is showing at top. Can you please give a sample expression.

Hi @jyothis_m this is working in my Test App. The filter is working as expected.

https://www.appsheet.com/start/187ffd57-1704-4bc3-9725-57e513a57bbb#appName=Test-549987&table=Products&view=Products_Inline+2&userfilters=[[%22attribute%22,%22Amount%22,{%22start%22:1,%22end%22:1}]]

Hi @Fabian_Weller can you give the expression which was entered in the expression field in the app editor along with Linktoview() 

Finally got it working. I was using Action Goto Another View within App with the following expression

CONCATENATE(LINKTOVIEW([VIEW]),"&userfilters=",ENCODEURL('[["attribute","Status",{"Pending":true}]]'))

However, this resulted in navigating to the view with FIlter showing at Top, but actually data not filtered.

I found that i had to add the following also with the expression

"&table=TableName"

Deeplink created with LINKTOVIEW() does not contain "&table=" parameter and thats why the filter was not working. Once I added it, everything is working fine. So my final expression is

CONCATENATE(LINKTOVIEW([VIEW]),"&userfilters=",ENCODEURL('[["attribute","Status",{"Pending":true}]]'),"&table=",ENCODEURL([Table]))

Good finding thank you @jyothis_m 

Hi @jyothis_m,

I am trying to use this URL approach, but I am missing something regarding the syntax... I have a Task column (text) and would like to filter it for rows that contain "Leaks", my URL: https://www.appsheet.com/start/88f14e5c-b056-4522-ae7f-7f05517bdf9d#appName=tasksapp-99999&table=Tas...

Please, do you have any suggestions or a doc/link where I can find more about the &userfilters syntax for matching text?

Thank you

Paulo 

 

Hi @Paulo_Negrao Your URL looks fine. What is the exact problem? When you use the App in Desktop view, you can use the filter and then check the URL. Your LINKTOVIEW() expression should produce the same URL. Then it should work.

Hi @Fabian_Weller,

Here go some more details about the issue...userfilters not working.png

Any ideas how to use &userfilters to filter for a string in a text column will be very welcome.

Thank you, cheers!

Paulo 

Hi @jyothis_m  and @Fabian_Weller 

After some trial&error process... I've got a working syntax...userfilters working OK.png

I wonder why is so difficult to have a basic documentation about the AppSheet URL options and syntaxes??!!... kind of weird...

Anyway... thank you guys for the insights and help!

Cheers,

Paulo

Hi @Paulo_Negrao Sorry for the late reply. I saw your post just now. Great that you found the solution. You are correct. The appsheet documentation can be updated with all these points. I also struggled getting my url with filter working. 

Hi @Paulo_Negrao so nice that you found the solution. I thought your column [Task] was a Yes/No column. But now I see that it's a text column. So in that case as you mentioned the syntax is:
&userfilters=[["attribute","Column_Name","Your_Text"]]

I couldn't find this on Google, so with trial and error, I figured out how to supply user filters on multiple attributes. Thought of sharing it, in case it helps someone.

Syntax for userfilters is: (This is for text attributes)

[["attribute","first attribute name",{"first attribute filter value": true}],["attribute","second attribute name",{"second attribute first filter value": true, "second attribute second filter value": true}]]

Adding more findings...for date type column filters: For example, if your column name is OrderDate and you want to filter all Order Dates between 1st July 2023 and 22nd July 2023, below is how you'll write this in the URL

[["attribute","OrderDate",{"start":"07/01/2023","end":"07/22/2023"}]]

In a desktop table view. User applies some filters and then they Click on any record and edit it. Once the form is saved I am using that table view where user will be taken. But the filters are gone now. Can we create an action which takes again to the filtered view?

Top Labels in this Space