Hi everyone I am new to PowerApps and I have a question.
Sorry for the long post.
We have a SharePoint list used for checking stock-taking, every month the purchasing list items they want branches to do a stocktake. so we have columns like the name of the item, internal code, manufacturers code etc.. and Leeds, Sheffield, Derby etc..
So every month branch manager would get the list and he/she carries out a stocktake and comes to the list to find his branch i.e. Sheffield (a choice type) and enter yes or No.
What I want to do is filter the rows for a specific branch. So the manager only sees his/her own stock lines that they need to update and then changes the value to Yes or No.
I can get the manager's branch from Office 365 and I am wondering if
Branch = Sheffield then find the column called Sheffield and filter the rows for Sheffield and return the value Yes or No.
Can this be done?
Not sure exactly how your data is structured but this should get you the info you need:
One way to accomplish your goal is to create a global variable for the User's branch when the app is opened and then use that variable to filter the data source for your galleries. Something like
Set(brnch, Lookup(Outlook365, Email=User().Email, Branch)
in the OnStart property of the app and
in the Items property of a gallery.
I do not know any way to retrieve a column name and then use that in a function. You would have to set up the logic to check for a specific column depending on the value of a variable. You could gathered the Branch of the current user in a variable and then used a Switch function to select the field and then test that for a value.
Thanks, I did use Office365 and returned the branch from the field Location but I tried to get to the column name but it didn't work.
Back to drawing board and I will have to design the list provided business is open to it.
If you know the branch then you can assign that to a variable and use a Switch function to look in various columns.
the Switch Function is like If but designed for multiple answers so you do not have to nest the Ifs.
Here is the documentation:
You can use that to Filter your list
Check out the News & Announcements to learn more.
Did you know that you can visit the Power Query Forum in Power BI and now Power Apps
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.