cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ArkadiuszS
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
mdevaney
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

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

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (50,444)