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 / 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

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