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 / Collect inside of ForA...
Power Apps
Unanswered

Collect inside of ForAll behave differently than ForAll inside Collect - why?

(0) ShareShare
ReportReport
Posted on by 216

Hi Power Users,

I have created two different functions which I thought should work in the same way:

#1)

Z_Lukowski_0-1624894668481.png

#2)

Z_Lukowski_1-1624894720062.png

filter part of this function is working properly, was tested before (let's skip the delegation for now),

 

#1 is working properly, returning me collection with Level (in text, based on choice field) and Threshold (number) - total of X records

 

#2 however is also creating X records, creating proper column names (they are only defined in this function, so I know this part is workings), but data is empty:

Z_Lukowski_2-1624895024287.png

I cannot understand the difference between those functions, for me they both should return populated collection.  I just need to understand this code, no need for alternative solutions as I already have #1 working, if you have any idea, let me know.

 

 

 

 

 

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

    @Z_Lukowski 

     

    not a solution, but a suggestion.

     

    your datasource is 'Reporting Units' and it has a column called 'Threshold Configs'.

    that column returns a Table which has a column called 'Type'.

    'Type' column is a choice column?

    If yes, in your #2 code 

    Text(Type.Value) = "Application Phase"

  • Z_Lukowski Profile Picture
    216 on at

    @Alex_10 Filter is working properly, If I change the Text(Type) to Text(Type.Value) then it produce an error:

    Z_Lukowski_1-1624911525233.png

    You tell me why, I also thought at the start that I should use Text(ChoiceName.Value), but Text(ChoiceName) works correctly.

    Z_Lukowski_2-1624911741349.png

     

     

  • Al_10 Profile Picture
    1,691 Super User 2024 Season 1 on at

    @Z_Lukowski 

    I see now.

    Your datasource is Dataverse.

    It works in a different way then SharePoint and many other data sources.

    Cannot test as have a limited access to Dataverse.

    The code looks something like:

     

    Type.PrimaryColumnNameInThresholdConfigs = "Application Phase"

    OR

    Type.PrimaryColumnNameInThresholdConfigs = 'Type (Threshold Configs)'.'Application Phase'

     

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard