Deep links from a navigation menu: LINKTOFORM() possible?

I have a navigation menu that is built from a database table that contains the name of the links, and the desired App deep link formula. I know it is possible to do a LINKTOVIEW() by constructing the App formula like so in the database column:

 #view=New Requisition   

But what I really want to do is create an app link that is equivalent to a LINKTOFORM() with some preset values, e.g. LINKTOFORM(“New Requisition”, “type”, 3, “inventory_location”, 1). I have not been able to figure out a way to do this so far. Is it possible? I’ve been using this page for refence: https://help.appsheet.com/en/articles/1023058-app-column-type-deep-link

Thanks for any insight!

The LINKTOFORM() function should do just what you want. How is it not working for you?

It gives me this error when I put a LINKTOFORM() in the App link field.

What is “the App link field”?

So, we have a gallery view built on this database table:

And set up like so in AppSheet:

As you can see, the ‘link’ column is “App” type – Putting in “#view=Instant Field Requisition” in the database for this works to navigate to that view, but putting an actual app formula in there does not. My intended goal is to have my gallery links do a LINKTOFORM() with some pre-filled values. I am not sure how to achieve this.

1 Like

I’m getting the same error when trying to link to a view.

Following.

LINKTOFORM(...) is an expression, not a data value: it should go in the App formula property, not in the database itself.

1 Like

@tkeats @Steve

The functionality you are referencing is the App Launcher definition discussed in the article below. It does speak about launching a specific view within an app. It references the second article below.

I hope these have what you’re looking for!!

1 Like

LINKTOVIEW(…) , LINKTOFORM(…) are not valid values that you can put into a spreadsheet cell, these are expressions that generate deep link URLs when placed in an App Formula, or Initial Value. I also suggest not trying to manually use or generate deep link URLS unless absolutely necessary.

@Nilson_Cain move the LINKTOFORM(…) to the App Formula field for your link column. You’ll need to put the other arguments in separate columns in order to generate the appropriate link per each row. A complex IFS expression, or a re-think of your design here might be necessary.

@tkeats An App-type column (such as your [View Link]), expects a deep link url as its value. That deep link can be generated by giving the column a formula using LINKTOVIEW or likewise. It appears that the value currently in that cell is the text value ‘LINKTOVIEW(“Add Call”)’, which is not a valid url deep link for the system to follow.

I may be wrong in my assumption of what exactly you have going on here, but I would suggest adding another column to hold a [view name], such as “Add Call”, then for the [view link] column, give it a formula of LINKTOVIEW([view name]).

Hope this helps. Please ask if you need more clarification.

1 Like

Marc, I am working with @Nilson_Cain on this project and I appreciate your input. Although, I am hoping this IFS expression works, we already had to create 8 views in MYsql that establish 8 new tables in Appsheet for the sole purpose of prefilling a few columns. An effort that would have been solved by simply telling appsheet to assign a linktoform action/behavior to a gallery item, or as we attempted to do, by assigning a deeplink to a gallery item. Gallery is a bad option regardless but there is no “grid” of actions that you can create outside of a detail view so you have to default to using gallery to attempt a very basic mobile UI icon grid.

@Marc_Dillon, I have tried doing this by putting the LINKTOFORM() in the App Formula field like so:

IFS([name] = "Pickup Field Requisition", LINKTOFORM("Pickup Field Requisition","type","3","inventory_location","1"),
    [name] = "Instant Field Requisition", LINKTOFORM("Instant Field Requisition","type","3","inventory_location","1"),
)

But clicking on those gallery items does nothing at all. Any ideas?

Thanks

I figured it out. I had to add a virtual column that builds the deep link from the app formula. Otherwise it was trying to use the (NULL) value from the [link] column instead of the App formula for some reason.

Glad you got something to work.
Just to clarify, you guys know about assigning a Row Selected action?

Here’s a crazy thought! I

s there any chance that AppSheet honors pre-processing directives like what is used in Workflows and templates?

For example, would this work in the Link cell: <<LINKTOFORM(...)>>?

That would be nice

Now that I have a bit more time, I’ll further explain a navigation table/gallery setup I have in mind that may suit your needs. You appear to want to mix more complex deeplinks, like linktoform that need extra parameters, with simpler ones like linktoview, in the same navigation gallery.

Now it is entirely valid for you to manually input deeplink urls into an App-type column for each record, but that requires a bit of backend work, generating and double-checking each URL. Doesn’t sound too fun to me, but I can see an argument for it.

What I propose as an alernative would have a column structure such as:
key | Display Name | View Name | type | col1 | val1 | col2 | val2 | … | link

Then use an app formula for the link column such as:
IFS( [type] = “simple” , LINKTOVIEW([view name]) ,
[type] = “form” , LINKTOFORM([view name] , [col1] , [val1] , [col2] , [val2]) )

Now what this does is allow you to generate new navigation selections from inside the app by just filling in the fields. I hope you get the idea and can expand/tweak it for your needs.

You mentioned using a virtual column for your link formula. You can achieve the same by putting the formula in a real column, you just have to open each existing record to edit and save it. A virtual column will calculate every sync, but the real column will only calculate when editing that record, and thus will be more efficient, although if we’re just talking about a small number of navigation records, you probably won’t notice.

2 Likes

Thanks for your help on this. It turns out what I was trying to do is pretty simple and i thought it was more relevant to the original question posted by @Nilson_Cain(sorry)

The following video lays it out what I was going for. A gallery view of clickable icons. There is also an Appsheet sample app called “Icon Main and Sub Menu” that is helpful too.

https://www.youtube.com/watch?v=3arhRb_DSxI

2 Likes

Hey Marc, got busy building and had not checked back. The solution @Nilson_Cain came up with is working but I agree an easier way to edit the links would be nice rather than editing the IF formula. He is going to review it.

@Nilson_Cain
May be remind you that provided you had set your app to work offline, the VC that you had set for the deep-link won’t be evaluated unless you explicitly don’t have an active internet connection during app’s initial start. Provided your field values are static that are passed to the Form UX, I might propose using below expression directly in your App type column set out in the gSheet:

#control=YourTableName_Form&defaults={"type":"3", "inventory_location":"1"}