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 / How to return a list f...
Power Apps
Answered

How to return a list from a table (share point list)

(0) ShareShare
ReportReport
Posted on by 82

Hi Everyone, hope I can explain this....

 

I have this table as a Sharepoint list:

 

MichaelF1_0-1658848846672.png

I want to return a list of the Staff that e.g. Bob Marley manages; in this case ["Barry White", "Diana Ross"].

I'm then going to use this list to filter a table so Bob can view just his team members. I think I can do this bit if I can get the list of his team!

 

Thanks in advance everyone 🙂

 

Categories:
I have the same question (0)
  • Anonymous_Hippo Profile Picture
    1,247 Super User 2024 Season 1 on at

    Hello @MichaelF1 ,

    I am assuming that you would need a combobox filter to filter which person's staff you would like to see or if you would like to see everyone

    You would need to add a drop down to dynamically filter based on The manager 

     

    Filter(
     Name of yourSharepointList,(Len(ManagerfilterCombobox.Selected.Result) = 0 || 'Manager' in ManagerfilterCombobox.SelectedItems) ))

     

     Alternatively you can filter and add this information into a collection as well

     

    Hope this helps


    Cheers

  • MichaelF1 Profile Picture
    82 on at

    Hi @Anonymous_Hippo , thanks for the reply. Sorry I should have said, the managers name will come from a text input which is called username_imp.

    So I have tried this based on your suggestion:

    Filter(Leave_Booking_Users,(Len(username_inp.Text) = 0 || 'Manager' in username_inp ))

    But I'm getting an error 😞

    Can you see where I'm going wrong please?

     

    Thanks again,

     

    Michael

     

  • Anonymous_Hippo Profile Picture
    1,247 Super User 2024 Season 1 on at

    Hello @MichaelF1 

     

    Can you please try this

    Search(Leave_Booking_Users,username_inp.Text,"Manager")
    
  • MichaelF1 Profile Picture
    82 on at

    Hi, thanks for the reply.

     

    The code doesn't generate any errors (just a  delegation warning) but I don't see any text. have I set up the test correctly?

    MichaelF1_0-1658991237997.png

    Thanks again

     

    Michael

     

  • Verified answer
    Anonymous_Hippo Profile Picture
    1,247 Super User 2024 Season 1 on at

    Hello @MichaelF1 ,

     

    Sorry for not being clear ! you would first need to add in either a datatable or a gallery control to display the list data that you want to return. Also are you using a label instead of a text input ? perhaps this will help you more 🙂

    Anonymous_Hippo_0-1659018842681.pngAnonymous_Hippo_1-1659018873489.png

     

     

    //Search(Leave_Booking_Users,username_inp.Text,"Manager") // THis formula has delegation warning
    Filter(Leave_Booking_Users,StartsWith(Manager,username_inp.Text)) // THis formula does not have delegation warning but only searchs the first x characters of the whole word
    
    

     

    Please input this formula in the items property of the data table or gallery

    The first formula will have delegation warning. If you do not know what delegation warning is i would highly recommend reading this

    https://docs.microsoft.com/en-us/power-apps/maker/canvas-apps/delegation-overview#:~:text=app%20to%20production.-,Delegation%20warnings,operate%20on%20delegable%20data%20sources.

     

    Second formula does not have delegation warning but uses startswith instead of a proper search function. I believe that it should not be a problem and should get the work done

     

    Let me know if this helps 🙂

     

    Cheers

  • MichaelF1 Profile Picture
    82 on at

    Hi @Anonymous_Hippo , yes that worked fine 🙂 Thanks very much for your help.

  • Anonymous_Hippo Profile Picture
    1,247 Super User 2024 Season 1 on at

    @MichaelF1 Happy to help 😄

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard