cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

GroupBy Workaround needed please

Hi All

 

I recently learned Groupby isn't delegable, despite not showing any warnings.

My use case is the following:

 

I have a parent list --> Conflict Check List TESTING APP

NativeNass_1-1645531278314.png

 

I have a child list --> Conflict Check Response TESTING APP

NativeNass_2-1645531333656.png

Conflict reference ID refers to the ID column in the Parent list

 

 

Used for an approval flow going around several users

 

Both are on Sharepoint Backend.

The parent list has all client info, that relates to the approval request.

The child list captures all the approval responses.

 

With({wFilteredChecksList: Filter('Conflict Checks List TESTING APP', 'Conflict Approval Status' = "Pending")},

    With({wFilteredResponses: Filter(RenameColumns('Conflict Response List TESTING APP', "ID", "ResponseID"), 'Conflict Reference ID' in wFilteredChecksList.ID)},

        With({wGroupedResponses: GroupBy(wFilteredResponses, "Conflict_x0020_Reference_x0020_I", "DATA")},

            With({wUserNotPresentInGrouped: Filter(wGroupedResponses, Not(varUserEmail in DATA.'Approver Email'))},

                Filter(wFilteredChecksList, ID in wUserNotPresentInGrouped.Conflict_x0020_Reference_x0020_I)))))

 So I 

1. Filter all the parent list records that have the status "Pending".

2. Rename the ID column in my child list to avoid conflict and filter the child list where 'Conflict Reference ID' has the same value as the parent "ID". (this way they relate to each other)

3.I Group all records in the child list that have the same 'Conflict Reference ID'.

4.Then I filter that data to show only the ones where the logged in user is not present

(this way, the logged in user sees which approvals are still 'pending' for him.)

(when a user submits his response, a record is added in the child list, so that makes his user email present in the 'Approver Email' column)

 

My Child list is going way above 2000 records but I didn't know GroupBy was't delegable.

 

Are there any known workarounds?

 

Kind regards & thank you in advance

1 ACCEPTED SOLUTION

Accepted Solutions

@Anonymous ,

Other than the Choice field workaround mentioned, no. The Solution (for the benefit of others in the future) is that there is presently not one.

View solution in original post

6 REPLIES 6
WarrenBelz
Super User
Super User

Hi @Anonymous ,

There may be a suitable process for you using Choices for the primary gallery - @RezaDorrani actually did a video on it yesterday.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

 

Anonymous
Not applicable

Hi @WarrenBelz 

 

Yes I have seen the video. I am just not so keen on adjusting the database since this is already a production environment.

I was wondering if anybody new a workaround in using code.
But I am starting to fear that GroupBy is the only way...

 

Kind regards

Hi @Anonymous ,

You are correct - GroupBy is not Delegable and there are no real workarounds.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

WarrenBelz
Super User
Super User

Hi @Anonymous ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

Anonymous
Not applicable

Hi @WarrenBelz 

 

Thank you for your response, but from my understanding there isn't really a solution in overcoming GroupBy Delegation?

 

Kind regards

@Anonymous ,

Other than the Choice field workaround mentioned, no. The Solution (for the benefit of others in the future) is that there is presently not one.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,340)