Appsheet dynamic starting view after each sync

I want to see a dynamic starting view after syncing the app.
Under Options Tab, I place below expression in Starting view

IFS(
IN(“Staff Productivity (Labour Registration)”,[Modules]), “Open Tasks”,
IN(“Growth Tracking (Greenhouse)”,[Modules]), “Growth Tracking (Greenhouse)”,
IN(“Growth Tracking (Nursery Vegetables)”,[Modules]), “Growth (Nursery Veg)”,
IN(“Growth Tracking (Nursery Pot Plants)”,[Modules]), “Growth (Nursery Pots)”,
IN(“Tank Sampling”,[Modules]), “Tank Sampling”,
IN(“Staff Attendance”,[Modules]), “Staff Attendance”
)

still, it is not updating the default view. The condition is not working.
Please guide me on how I can achieve the expected result?

My purpose is if the user has selected only 2 Modules such as Tank Sampling and Staff Attendance then by default(after sync), only 2 Modules will display and the Tank Sampling menu should highlight and that view(Tank Sampling) and data should load.

For me, the module condition is working perfectly but the default starting view is not working. It’s always loading “Open Tasks” view.

First thing, I recommend to always implement a default condition in an IFS() function. It would be something like this:

IFS(
IN(“Staff Productivity (Labour Registration)”,[Modules]), “Open Tasks”,
IN(“Growth Tracking (Greenhouse)”,[Modules]), “Growth Tracking (Greenhouse)”,
IN(“Growth Tracking (Nursery Vegetables)”,[Modules]), “Growth (Nursery Veg)”,
IN(“Growth Tracking (Nursery Pot Plants)”,[Modules]), “Growth (Nursery Pots)”,
IN(“Tank Sampling”,[Modules]), “Tank Sampling”,
IN(“Staff Attendance”,[Modules]), “Staff Attendance”,
true, "Open Tasks"
)

Secondly, as far as I know, the Starting View will not be evaluated again after the initial launch. In other words, the app does not return to the Starting View after a Sync.

I am unclear where the [Modules] information is coming from. Is that a column in a table?

3 Likes

Yes, @WillowMobileSystems. It’s a Column(enumlist). Thanks for your answer regarding “app does not return to the Starting View after a Sync.” So now I have a better idea about that part. So is there another way, we can call the starting view each time after sync OR any other way for doing it? Thanks again for your reply. So basically I want to change the view based on selected values after every sync.

No, what you want is not possible.

1 Like

While you cannot call the Starting View, you can accomplish what you are trying to do.

Each view has a Show If property that you can utilize to show or hide that view for each person. You cannot reference rows for that view in this property but you can query table information.

If I were doing what you have described, I would make a “User View Selection” table and record which views the user wants to see. Maybe have columns “User” and “View”

Then in each view’s Show IF, you could use an expression similar to:

IN("This View Name", SELECT(User View Selection[View], User = USEREMAIL()))

I’ve not done this so others, please jump in if you see an issue or know a better way.

I hope this helps!!

Thanks again @WillowMobileSystems for your help. Yes, in each view’s Show IF expression I already added and it’s working properly. I wanted to achieve after sync, data should also load automatically along with the starting view. Thanks, @Steve for your reply.

1 Like