Automate Creation of Slices

tvinci
New Member

Hi AppSheet Community,

Iโ€™m creating a driver dispatch app where every driver has a view of their own โ€œclipboard.โ€ The number of drivers and who is or isnโ€™t a driver is variable. Drivers may quit or become newly hired at a momentโ€™s notice. Is there a way to automate the creation of a data slice for a specific driver when a user creates a new โ€œdriverโ€ object? For example if Bob is hired as a new driver can I automate the creation of a data slice for Bob or do I have to manually enter him into the app?

Thanks!

Solved Solved
0 7 198
1 ACCEPTED SOLUTION

Hi, if you have an email column with the initial value USEREMAIL() in your table, you donโ€™t need to create new slice every time when new employee arrives. You can just use a condition rule like USEREMAIL()=[EmailColumn] with one slice.

View solution in original post

7 REPLIES 7

Hi, if you have an email column with the initial value USEREMAIL() in your table, you donโ€™t need to create new slice every time when new employee arrives. You can just use a condition rule like USEREMAIL()=[EmailColumn] with one slice.

Hi @Aleksi,

Iโ€™ve attempted what you suggested but the โ€œRoutesโ€ in my app do not populate user views like theyโ€™re supposed to. Do you know what Iโ€™m doing wrong? Here is the Show_If constraint for the Clipboard View

Here is how I created the slice

Thank you.

What are you trying to accomplish with the Show_If for the Clipboard view?

Does the slice itself work as intended?

So the slice works as intended because it creates a view for every email address in the Users table.

With the Show_If for the Clipboard view I want a different clipboard view for every user with a distinct email address. The clipboard view should show routes for only that user, but itโ€™s showing routes for all users.

A viewโ€™s Show_If merely determines whether the view is displayed in the main menu or in the navigation bar; it does nothing to control the data presented within the view. The view will display whatever data is in the table or slice to which the view is attached. Youโ€™ve apparently attached the view to a data set that includes all users. Looks to me like you want it attached to the Routes slice instead.

What exactly should I attach to the Routes slice? I only have one slice at the moment. Thank you.

I reread what you wrote and for some reason it didnโ€™t make a difference, which stumps me. Thank you though.

Top Labels in this Space