Help with deep links to create a pasteable URL for use outside AppSheet?

Hi Everyone,

I am so sorry to use everyone’s time on this, because I know that it’s my own inexperience that’s causing this issue. But I just cannot figure this out, and AppSheet Support was not able to help me.

I made a previous post which is here, and I also have made some progress using this post that I found. And people have referred me to the help page on “deep links” but I can’t make much sense of it.

I have spent hours on this but I can’t get all the way to a solution. Maybe someone is able to assist? I’ll explain the full context to avoid misunderstandings.

I am not a software engineer, just an administrator at a four-person small business. We have two employees who go into the field to various sites. We have an incredibly basic AppSheet app. It has only one table, and no interactivity or functions to speak of. The way we use it is that each row in the table is a site, and the columns/fields contain information about the site. When they are in the field, the employees use the app to look up information about the sites. That’s it.

We also use Google Calendar. I make events on the calendar for our employee’s site visits. Here is what I am trying to do:

create a valid URL (that will stay valid over time), so that when I create a Google Calendar event for a site visit, I can paste that URL into the details box in the event, thus creating a link. Later (weeks or months later) when the employee heads to that site, they open their phone, click the event, click the link, and our AppSheet app opens, displaying the page for that site.

That’s it. It doesn’t seem like it should be hard??? But it’s taken hours and hours of struggle :sob:

In my last forum post, a user suggested a very simple solution: open the desktop version of our App and navigate to the row/page/detail view for the needed site, then just copy and paste what is the the URL bar. That did not work. It SEEMED like it worked at first, because when I test it immediately it works. But weeks or months later, 80% of the time, instead of opening AppSheet to the correct spot, the link opens AppSheet to a blank screen that says “no item selected”. I don’t understand why the links would work immediately but not work later on.

Based on what I can find on the forums, this seems like it will involve using a virtual column which contains an expression that generates the correct link and displays it in AppSheet, and then I will need to copy it out of AppSheet into the Google Calendar event. But what expression do I use?

If anyone has read this far, thank you so much, I appreciate you and any light you can shed on this situation!

Alexander

In the configuration for the view you want to display when the link is followed, go down to the Behavior section and find the view’s App link:

To create a link to a specific row, add &row= followed by the value of that row’s key column value.

https://www.appsheet.com/start/your-app-id#view=Example_Detail&row=row-key

To generate the URL as a virtual column, add a new virtual column with an App formula of:

CONCATENATE(
  "https://www.appsheet.com/start/",
  "your-app-id",
  "#view=Example_Detail",
  "&row=", [_THISROW]
)

Replace your-app-id with the text from the app link.

4 Likes

Oh my god this looks like it is working! Thank you SO much!!! I was hoping you might respond. I was telling my friend yesterday “The whole thing is held together by this one superuser named Steve…”

2 Likes

Hi Steve (and anyone else who can help??),

This solution was great but it is not working in the long run :sob:

The links kept breaking or being wrong after some time had passed. I couldn’t figure out what was causing it, so I didn’t bother bringing it up because it wasn’t reproducible.

I just figured out what is happening!! The deep link constructed using this method uses the row of the Google Sheet as part of the link. So if (at any point after the link is constructed and pasted into the outside environment) a new row is added to the Sheet, suddenly the original row number is no longer correct. In fact, not only does ONE of the links break, but if I’ve made 25 of them, all 25 break, because all of the rows have ‘shifted up’ one, because of a single row being added lower in the Google Sheet.

Any ideas how to fix this?!

Thank you so much,

Alexander

(there is an obvious workaround, which is to make a bunch of shenanigansy kludgey workflow changes to eliminate the need to ever create a new row, but that seems insane)

Never use _RowNumber as your key. That’s your problem.

1 Like

Totally. I didn’t realize that was happening until now. It must have chosen it by default. Is it too late to change? If I change the Key column to something else now is that going to screw everything up?

1 Like

I tried to change it and yes it broke everything lolsob

1 Like

Ok, we’re an education business so we’ll try to fix this situation in the summer, maybe we’ll just re-create the whole app. Right now we’re in the middle of things so we’ll have to go with a workaround so that our links stay valid! Thanks for your help, Steve.

1 Like

You can only change the key column of a table if and only if your app doesn’t have any Ref, List of Ref, Enum of Ref, or EnumList of Ref columns that use the table. If you do and you change the key column, all of those Ref columns will break, as you found. This is a reason choosing the right key column is so important. It’s possible to change the key column but it’s very tedious.

2 Likes