cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
zdieter
Level: Powered On

Update a table

Hi,

 

I am making an app to manage our Azure to keep employee information up to date. I have a master Excel list with each group of people on a different sheet. I want to make it so if manager "A" gets on to use the app, they will see one table, but if manager "B" gets on, they will see a different table. However, I do not want to make a screen for each group because there are about 50 of them. Is it possible to update one table dependant on something a User click? If I need to explain further, please ask. 

 

Thank you for time,

Zach.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Update a table

Hi @zdieter,

 

There is no need to switch the table by a user click.

Within PowerApps, there is a way to auto-determine the needed table with the sign-in user information.

 

Please follow the steps below:

1. Save the Current user information and the Table and the Manager relationship into collection, we need to perform this under the OnVisible property of the first screen, with the code below:

Set(CurrentUser,User());
ClearCollect(TableCollection,
Table({ManagerEmail:"ManagerAEmail@company.com",Table0:Table1},
{ManagerEmail:"ManagerB@company.com",Table0:Table2}))

2. Using lookup to determine which table should be displayed under the Gallery:

Lookup(TableCollection, ManagerEmail=CurrentUser.Email, Table0)

Let me know if this works for you.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Community Support Team
Community Support Team

Re: Update a table

Hi @zdieter,

 

There is no need to switch the table by a user click.

Within PowerApps, there is a way to auto-determine the needed table with the sign-in user information.

 

Please follow the steps below:

1. Save the Current user information and the Table and the Manager relationship into collection, we need to perform this under the OnVisible property of the first screen, with the code below:

Set(CurrentUser,User());
ClearCollect(TableCollection,
Table({ManagerEmail:"ManagerAEmail@company.com",Table0:Table1},
{ManagerEmail:"ManagerB@company.com",Table0:Table2}))

2. Using lookup to determine which table should be displayed under the Gallery:

Lookup(TableCollection, ManagerEmail=CurrentUser.Email, Table0)

Let me know if this works for you.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

zdieter
Level: Powered On

Re: Update a table

Thank you so much! That works perfectly! 

zdieter
Level: Powered On

Re: Update a table

Quick Question, if I had managers that managed multiple groups, how could I give them the option to pick which table to go to?

Community Support Team
Community Support Team

Re: Update a table

Hi @zdieter,

 

If some tables share the same manager, then the TableCollection would need another column to identify each table, so that the lookup() function could identify the unique table.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
zdieter
Level: Powered On

Re: Update a table

That works! Thank you!.

Last question I promise, but I want it so the person using the app can click on a person and get all the details but I cannot get the detail forum to connect to the current table. I have tried using a the same lookup forumal you gave me and tried setting a variable to the current table.

 

 

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (5,107)