How to Display Views Based on URL Parameters in AppSheet?

Hello everyone,

I am trying to understand how I can display different views in my AppSheet application based on parameters that are added to the URL when entering the app. For example, if I use an URL like https://www.appsheet.com/start/<AppID>?userType=client, how can I make the app show a specific view based on the userType parameter?

I would appreciate any guidance or examples on how to implement this.

Thank you in advance for your help!

0 11 570
11 REPLIES 11

Steve
Platinum 5
Platinum 5

Not possible.

As @Steve has pointed out, you cannot pass parameters to an AppSheet app on the URL in an attempt to dynamically control which view is shown.

However, You can build your URL to navigate to a specific view.   I don't know how your users get the URL but if you were sending to them by email, for instance, you would know that they are a client and you would provide them with the URL that goes directly to the client specific view.

You can also use this userType to filter data and then take advantage of that to navigate, through URL, to a common view.

For example, let's say your app contains Orders placed by clients and you have an Orders View.  And let's assume you want users of type "Employee" to see ALL Orders but users of type "Client" should only see orders that client has placed. 

You would first implement in your app the ability to determine what type of user the logged in person is.  Then next you would apply Security Filters to reduce ALL data tables to only the data that user type should see. 

Now, a URL can built that takes any given user to the Orders view.  Doing so will automatically launch the app as that person would normally see, SEcurity filters and all, and then navigate them to the Orders View.

I hope this helps!!

Hi , and think's for your help ๐Ÿ™‚

The best thing about AppSheet is there's....

Always another way (matrix) - reduced.gif

Instead of approaching the problem from the perspective of:

  • I'm going to modify the URL to adjust the behavior of the app

Do instead something like:

  • I'm going to modify the data that the app runs on

This way when the user opens the app, or updates the app, this newly updated data is there - and the app reacts accordingly.

HI and think's for heliping , but there is my use cas

I have two authentication views set up: one for employees that requires a username and password, and another for clients that uses a client ID and an access code generated by the server.

I'm looking for guidance on how to redirect clients to the client authentication view and employees to the employee authentication view based on the URL.

 I'm not sure if Iโ€™m being clear, so please let me know if you need more details!


@pheninux wrote:

I have two authentication views set up: one for employees that requires a username and password,


Based on this, you are bypassing the AppSheet built in authentication.  I suspect then you are using a Public app on the Publisher Pro service. 

CAUTION - You should be aware that security into the app this way is very weak and relies on users being honest about who they are.  If you are concerned at all about people getting access to information they should not have - I would recommend to use an AppSheet secured app.

@pheninux wrote:

I'm looking for guidance on how to redirect clients to the client authentication view and employees to the employee authentication view based on the URL.


With the observation that this is a Public app... How do users get the URL and do you know at the time you give them that URL if they are an employee or a client?

If you do, then you can simply give each user a static link to the specific view they need to access - i.e. one link to the employee login view, one link to the client access view.

If you do NOT know whether it is an employee or client at the time you provide them a URL link, then I would recommend creating a "landing" page where the user taps a button to access the Employee login or another button to access the Client access.  Then you can give out a single URL link to everyone without any concern about their user type.

The only way you can determine if the user is an employee or a client and automatically  redirect them to the associated access view, is with an AppSheet secured app.  A secured app when launched can see who the user is using the app built in authentication and then automatically adjust what views each user can.  No login or entry of client details would be needed.

PRO TIP:   I would consider having two separate apps - one for employees and one for clients.  This make implementation within each respective app easier and eliminates any concern that clients might accidentally get access to views they shouldn't see.

I hope this helps!


Actually, no, I have a subscription of $10/month per user. With this subscription, I will have to pay for each user. I want to bypass this by using a single login and password, allowing everyone to use one AppSheet account. I'm not sure if this is the right approach, but I haven't found an alternative since my application will be used by many people, including clients and staff.

Yay! Theft!

I've helped at least a dozen people go down this exact road - and you should know that they all eventually stopped trying to do this, and built things around actual logins using the current user system.

Some, which needed to retain a public aspect, would bring a Google Form into the app; this allows the public to interact with the form, and those interactions are right there and can be used for automation triggers and what not.

Others upgraded to an enterprise account with a small number of licenses for the office/admin folk that make/modify apps, and a bunch of external user licenses for the users.  This is the more "official" route, and works quite well.

Anyway, thank you all very much for your help. I think you are right; sooner or later I will face complications. Even now, I'm starting to hit some roadblocks. I will stop and think of other approaches that are more secure and logical.

All of us understand the desire to save on costs.  Be aware there are several legit ways to minimize costs.

For example, you have mentioned that you need Employees and Clients to access the app.  What kind of clients are we talking about? 

When your clients access the app, if the app does not need to know exactly who that specific user is for any reason, then you could use a Public app ($50/month for unlimited users).  The idea is they would get their information by inserting some kind of order # known only to them - much like tracking apps for package delivery or online retail shops when you checkout as a guest.  

The idea is that you have a secured app requiring licenses used only by the employees.  A second app is the client access app built using the Publisher Pro plan at $50/month.  Both apps can share data from the same source.

Top Labels in this Space