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

Notifications

Announcements

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:
I have the same question (0)
  • 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 

     

  • 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard