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 / filter filtered sharep...
Power Apps
Unanswered

filter filtered sharepoint list data with data from another sharepoint list

(1) ShareShare
ReportReport
Posted on by 25
Hi friends
i create apps that use for check goods stock, i create 2 sp list, first is check stock plan and second is assign user for check
 
check stock plan SP list (over 20000 items)
Category Product Status
A Toy Check1
A Paper Check1
A Car Check2
B Soup Check3
B Candy Check2
C Water Check1
D Book Check1
 
assign user SP list
Category Person for Check1
A John
B John
C Sulivan
D John
 
I design that the user needs to type name into login screen before check goods
i create dropdown that their items are category from assign user SP list (for example if I'm John the dropdown item will have A, B and D if I'm Sulivan the dropdown item with has only C)
items property in dropdown is: Filter (assign user SP list,varloginuser=Person for Check1)
this dropdown uses for filter gallery from check stock plan list by category column
the question is how I could let the dropdown only display category that have status Check1 in check stock plan SP list
 
for example, if I'm John I need my dropdown item contain A, D because record in check stock plan SP list category B no have Status with Check1
 
Current Dropdown item
Category
A
B
D
  
 
What I need
Category
A
D
 
thanks in advance for any suggestions
Categories:
I have the same question (0)
  • abc 123 Profile Picture
    784 Moderator on at
    //Get John's Check 1 Categories
    ClearCollect(colJohnsCheck1Categories, Filter('assign user SP List', Person for Check 1' = "John"));
     
    //Using John's Check 1 Categories, get his Check1 Products based on his categories
    ForAll(colJohnsCheck1Categories As cat, 
       Collect(colProductsCheck1, 
             Filter('check stock plan', Category = cat.Category And Status = 'Check1')
       ) //Collect
    ); //ForAll
     
    I would restructure the 'assign user' list to be 
     
    Person | Check # | Category
    John            1              A
    John            1              B
    John            1              D
    John            2              C
     
    And then modify the two Collect actions accordingly
  • Supasith Profile Picture
    25 on at
    ,@ abc 123 thanks for your reply, i tried your formula but it error and display like this how could i fix it ? (Stocktake = check stock plan SP list , Countsheet = Category , NeedCheck1 = Check1)
  • abc 123 Profile Picture
    784 Moderator on at
    In the Filter() criteria, you have a comma, where I would use an "And" or &&, between .CountSheet and Status=
     
    Like either one of these:
    Stocktake = check stock plan SP list , Countsheet = Category And NeedCheck1 = Check1)
    Stocktake = check stock plan SP list , Countsheet = Category && NeedCheck1 = Check1)
  • Supasith Profile Picture
    25 on at
    @abc 123 thanks a lot ,it works but there is another ways because ForAll function heavily drain apps performance
  • Ravindra Jadhav Profile Picture
    342 Moderator on at
    Please Closed the Question, Mark it Solved 
     
    If my answer helped resolve your issue, please consider marking it as solved to assist others facing the same problem. Additionally, giving it a like would be greatly appreciated and motivates us to keep helping
     
    Thank You
    Ravindra Jadhav
  • abc 123 Profile Picture
    784 Moderator on at
    Regarding the horrible ForAll() performance, welcome to the #halfbakedpie that is PowerCrApps.  
     
    Maybe try using With() or Ungroup() to squeeze out some speed.

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard