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

Nilson_Cain
Participant III

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!

0 19 2,633
19 REPLIES 19

Steve
Participant V

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

Nilson_Cain
Participant III

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

What is โ€œthe App link fieldโ€?

Nilson_Cain
Participant III

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.

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

@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!!

tkeats
Participant I

Iโ€™m getting the same error when trying to link to a view.

Following.

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.

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.

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.

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.

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

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

Nilson_Cain
Participant III

@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

Nilson_Cain
Participant III

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.

@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"}

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

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

FINALLY! Someone explained this!
Can this be added to the Deep Link instructions page. I have been fighting with this for over a year.

Top Labels in this Space