cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

Delegation problem in Concat and Filter

Hi, 

 

I have small problem in PowerApps.
I send to Flow some string to add on excel table.

Scenario:

  • from gallery I click on checkbox button and I add to collect __GenerujRaport selected item

papps-01.png

  • when I click "Generuj (1)" button and send string which is generated like:
zapiszDoExcell.Run(
    Switch(
        wyborTypPisma.Selected.Value;
        "Przychodzące";
        Concat(
            __GenerujRaport;
            Year(DataPisma) & "/" & Month(DataPisma) & "/" & Lp & "(#)" & DataPisma & "(#)" & IDKontrahentaNazwa & "(#)" & Tytuł & "(#)" & SkierowanePion & "(X)"
        );
        Concat(
            __GenerujRaport;
            Year(DataPisma) & "/" & Month(DataPisma) & "/" & Lp & "(#)" & DataPisma & "(#)" & 
            Concat(
                Filter(
                    BazaKontrahentow;
                    Identyfikator =
                        Value(First(
                            Split(
                                IDKontrahenta;
                                ","
                            )
                        ).Result)
                )
                ;Nazwa & ", " & ulica & " " & NrBudynku & If(
                    Not(IsBlank(NrMieszkania));
                    "/" & NrMieszkania;
                    Blank()
                ) & ", " & Kod & " " & Miejscowosc
            ) & "(#)" & Tytuł & "(#)" & Kraj.Value & "(#)" & RodzajPrzesylki.Value & "(X)"
        )
    );
    ComboBox2.Selected.Email;
    wyborTypPisma.Selected.Value
)

I have problem in:

PAPPS.png

When I check outside first concat function whe number from IDKontrahenta (its look like "1234,231,1234")

 

First PowerApps show Delegation problem.

 

BazaKontrahentów is a Sources

__BazaKontrahentów is a Collection

 

I cannot use Collect because in BazaKontrahentow Lists are more than 2000 items...

 

Please help me, how can I use Filter inside Concat.. I try to use LookUp but its the same delegation problem.

1 ACCEPTED SOLUTION

Accepted Solutions

@ArkadiuszS 

Setting a variable would not have any impact on delegation unless you are reading information from your datasource (e.g. SharePoint List, Excel, etc).  The purpose of your code appears to be 'data processing'.  Many things can be done in PowerApps but it has limitations on what 'data processing' can occur. 

 

Therefore, I would suggest you pass everything needed to Flow and let and do the string split/concat there instead.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

 

View solution in original post

3 REPLIES 3
Super User III
Super User III

@ArkadiuszS 

You cannot use FILTER/LOOKUP here because the functions VALUE, SPLIT and FIRST cannot be delegated.  See the chart below.

 

What you are doing looks like it is going to run up against delegation issues no matter what.  Perhaps you could handle this complicated logic in Flow instead which is not subject to delegation limits.

 

 

Capture.PNG

 

Link to official MS blog post:

https://powerapps.microsoft.com/en-us/blog/sharepoint-delegation-improvements/

 

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

I saw this link. What about set var before Concat?

I need to get numbers from IDKontrahent (from split) and use in Filter/Concat function

@ArkadiuszS 

Setting a variable would not have any impact on delegation unless you are reading information from your datasource (e.g. SharePoint List, Excel, etc).  The purpose of your code appears to be 'data processing'.  Many things can be done in PowerApps but it has limitations on what 'data processing' can occur. 

 

Therefore, I would suggest you pass everything needed to Flow and let and do the string split/concat there instead.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

 

View solution in original post

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Kudoed Authors
Users online (58,583)