web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Referencing SharePoint...
Power Apps
Unanswered

Referencing SharePoint field within PowerApps

(0) ShareShare
ReportReport
Posted on by 15

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?

 

Cheers

Wessam                      

Categories:
  • BrianS Profile Picture
    2,407 Super User 2024 Season 1 on at

    Not sure exactly how your data is structured but this should get you the info you need:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-filter-lookup

     

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @Samo2005 

    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 

    Filter(datasource,Branch=brnch)

     in the Items property of a gallery.

  • Samo2005 Profile Picture
    15 on at

    Hi BrianS 

     

    Thank you for your reply, I attached a screen showing of the list column structure and I need to retrieve the name of the column rather than True or False.

     

    Cheers for looking.

     

    Wessam 

     

    StockTaking.png
  • BrianS Profile Picture
    2,407 Super User 2024 Season 1 on at

    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.

  • Samo2005 Profile Picture
    15 on at

    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.

     

    Cheers

    Wessam

  • BrianS Profile Picture
    2,407 Super User 2024 Season 1 on at

    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:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-if

    You can use that to Filter your list 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard