cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

Filter based on textsearchbox

Hello!

I am programming an application and I want startswith to be replaced with the function search. How can I do this?

SortByColumns(
    Filter(
        [@ProjectLijsten];
        StartsWith(
            Title;
            TextSearchBox1.Text
        )
    );
    "Title";
    If(
        SortDescending1;
        Descending;
        Ascending
    )
)

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @TimoMigchielsen ,

Do you want to replace the Filter function with Search function within your formula?

 

Based on the needs that you mentioned, I think there is something wrong with it. Please consider modify your formula as below:

SortByColumns(
           Search(
                  [@ProjectLijsten];
                   TextSearchBox1.Text;
                   "Title"
            );
    "Title";
    If(
        SortDescending1;
        Descending;
        Ascending
    )
)

More details about Search function, please check the following article:

Search function

 

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Helper II
Helper II

Hey mate,

 

Use the Search function like so:

 

Search([@ProjectLijsten], TextSearchBox1.Text, Title)


Regards,

Jacob Shand | Automation Specialist

NextStep Creations


Taking your PowerApps Skill the NextStep

Hey!

I have tried this but I get an error.

SortByColumns(
    Filter(
        [@ProjectLijsten];
        Search([@ProjectLijsten];
            TextSearchBox1.Text;
            "Subordernummer"
        )
    );
    "Title";
    If(
        SortDescending1;
        Descending;
        Ascending
    )
)

What error are you getting? Add a screenshot and I'll take a look 🙂

Apparently it is expecting the column to be text only. So I'll need to change that. And then it's saying the filter and search functions have invalid arguments. @JacobShand 

Changed it to a text column and I now get this error:
https://gyazo.com/8a7e79e6a5c429a012a7b14b8966dd43

And also this error:
https://gyazo.com/bc32897eec899d63821422449b0a5f20

Community Support
Community Support

Hi @TimoMigchielsen ,

Do you want to replace the Filter function with Search function within your formula?

 

Based on the needs that you mentioned, I think there is something wrong with it. Please consider modify your formula as below:

SortByColumns(
           Search(
                  [@ProjectLijsten];
                   TextSearchBox1.Text;
                   "Title"
            );
    "Title";
    If(
        SortDescending1;
        Descending;
        Ascending
    )
)

More details about Search function, please check the following article:

Search function

 

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

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

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (20,705)