cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ArkadiuszS
Level: Powered On

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
Super User
Super User

Re: Delegation problem in Concat and Filter

@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
Super User

Re: Delegation problem in Concat and Filter

@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."

ArkadiuszS
Level: Powered On

Re: Delegation problem in Concat and Filter

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

Super User
Super User

Re: Delegation problem in Concat and Filter

@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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (6,322)