web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Use the split function...
Power Apps
Answered

Use the split function in a gallery or other alternative

(0) ShareShare
ReportReport
Posted on by 90

Hi everyone,

I need help with a problem. I'm trying to use the Split function in a Gallery that has a SharePoint list as its data source. The problem I'm having is that the field I'm trying to apply the function to isn't text and therefore doesn't allow me to do the job.

 

Filter(
 DDBB; HRBP = "HRBP - OK";
 )

 

In this example I use Filter to filter the gallery, where I want to select by the word HRBP that is equal to "HRBP", but only up to "-". Therefore there is no way that it works: It does not work like this:

 

Filter(
 DDBB; HRBP = First(Split("HRBP - OK","-"));
 )

 

The sharePoint field containing "HRBP - OK" is STATUS Any idea how it could be solved? thank you

Categories:
I have the same question (0)
  • Clue Profile Picture
    187 on at

    If the case is that the text always is in the beginning you can use StartsWith([full text], [beginning of text to check]). StartsWith() will return true or false.

    Filter(
     DDBB; StartsWith("HRBP - OK", HRBP)
     )
  • SeguM Profile Picture
    90 on at

    Thank you very much for your answer Clue,
    The problem is that the data are variable.
    Thank you

  • Clue Profile Picture
    187 on at

    Alright, you can either use the "in" operator to see if a certain text is within a field or "StartsWith" if the text you are looking for is always at the beginning.

    If you require more assistance, please share a screenshot of the filter and provide more information and details about what you are doing:)

  • SeguM Profile Picture
    90 on at

    I've managed to make it work for me, and it does it correctly. The only problem is that it displays delegation warnings.

    Filter(
     DDBB; HRBP =Left(Fase;Find(" - ";Fase)-1);
     )

     

    I guess the problem is the Left and Find functions, but I think there is no alternative.

     

  • v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Segu1 ,

     

    Based on your description of your needs, I'm afraid delegation warnings are inevitable. Please check this link:

    Power Apps delegable functions and operations for Dataverse

    vbofengmsft_0-1682048600556.png

    Best Regards,

    Bof

     

  • Clue Profile Picture
    187 on at

    Hi @Segu1, I'm not sure that is the best way to do it. StartsWith() should be an alternative. If you could provide a screenshot of the code that would help in solving the problem:)

    Thank you!

  • Clue Profile Picture
    187 on at

    Hi @v-bofeng-msft,

    As @Segu1 specified, they are using SharePoint Lists as their data source. So while you are correct in that the functions are not listed as delegable, the link you provided is for Dataverse.

     

    Here is the one for SharePoint: SharePoint - Connectors | Microsoft Learn

    Clue_0-1682057769003.png

     

    StartsWith() Should be an option for the method they're using as the text seems to be positioned at the start of the string.

  • SeguM Profile Picture
    90 on at

    Hi Clue,

    I'm trying to upload an example, however the string to extract is variable, for example it could be like this:

     

    Filter(
     DDBB; STATUS =Left(Fase;Find(" - ";Fase)-1);
     )

     

     

    STATUS can be HRBP, or Manager.... And Fase would be, for example, HRBP - OK, Manager - OK, Manager - KO....

    Filter when start to delimiter matches STATUS.

    I think I have explained myself better now

  • Verified answer
    Clue Profile Picture
    187 on at

    Hi,

    I hope this helps as a solution for you:

    Clue_0-1682060829813.png

    Code:

    Filter(
     DDBB; StartsWith(Fase, STATUS)
    )

     

    Please get back to me if this worked! 🙂

  • SeguM Profile Picture
    90 on at

    Thank you very much, it's perfect, the warnings have already disappeared.

    👌😉

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard