cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
akosbanar
Advocate IV
Advocate IV

Issue in Search function

Dear All,

 

I found an interesting issue or paradox in Search function usage. 

I have a gallery what I filter with a textinput. Its seems like very easy, it isn't.

(Gallery -> Items)

akosbanar_0-1639483193705.png

As you can see for any reason the Power App underlines my code with red but it is working normally (also in the gallery).

The bigger problem when I'd like to use another column too in the Search function it already doesn't working.

 

akosbanar_2-1639483625870.png

 

 

 

If(
    IsBlank(Search_box.Text),
    PBIappsCollection,
Search(
        PBIappsCollection,
        Search_box.Text,
        "UseableTags",
        "Project Name"    
        )
)

 

 

 

I tried another method as well but with the same result.

 

 

 

If(
    IsBlank(Search_box.Text),
    PBIappsCollection,
Search(
        Filter(
            PBIappsCollection,
            Search_box.Text in UseableTags
        ),
        Search_box.Text,
        "Project Name"
	)
)

 

 

 

 

Note: "PBIappsCollection" is an Excel Online connector's data source.

 

Can you help me?

1 ACCEPTED SOLUTION

Accepted Solutions
akosbanar
Advocate IV
Advocate IV

I solved. 

 

It is still red underlined but working.

akosbanar_0-1639485524448.png

 

 

 

If(
    IsBlank(Search_box.Text),
    PBIappsCollection,
    Filter(
        PBIappsCollection,
        Search_box.Text in UseableTags || Search_box.Text in 'Project Name'
    )
)

 

 

View solution in original post

7 REPLIES 7
akosbanar
Advocate IV
Advocate IV

I solved. 

 

It is still red underlined but working.

akosbanar_0-1639485524448.png

 

 

 

If(
    IsBlank(Search_box.Text),
    PBIappsCollection,
    Filter(
        PBIappsCollection,
        Search_box.Text in UseableTags || Search_box.Text in 'Project Name'
    )
)

 

 

AJ_Z
Super User
Super User

what does it say when you hover over the red?



Signature:


If you appreciated my comments/responses please be sure to Like/Kudo them it really does make me smile 🙂 !
Link to the Power Platform Professionals United Kingdom User Group:

https://powerusers.microsoft.com/t5/Power-Platform-Professionals/gh-p/PowerPlatformProfessionalsUnit...

akosbanar
Advocate IV
Advocate IV

@AJ_Z 

akosbanar_1-1639485779859.png

This is the current error message with Filter function.

AJ_Z
Super User
Super User

Sorry i see your problem i can't believe i never saw it sooner.

try this:

 

If(
    IsBlank(Search_box.Text),
    PBIappsCollection,
    Search(
        PBIappsCollection,
        Search_box.Text,"UseableTags","'Project Name'"
    )
)

 

But this part "UseableTags","'Project Name'" will likely be different see what the app populates the column names as. Also ensure that Useabletags is string and project name is string for this method

 



Signature:


If you appreciated my comments/responses please be sure to Like/Kudo them it really does make me smile 🙂 !
Link to the Power Platform Professionals United Kingdom User Group:

https://powerusers.microsoft.com/t5/Power-Platform-Professionals/gh-p/PowerPlatformProfessionalsUnit...

@AJ_Z 
Me neither.

I created a test gallery because I don't want to wrong my existed good solution. 

akosbanar_0-1639488172837.png

I know that your code is absolutely correct because based on the MS documents but it isn't working.

akosbanar_1-1639488250528.png

 

i really think its the column names back space to until you reach Test_Textinput.text and see what column names it gives. i am happy to get on a teams call and screenshare to help troubshoot if needed

 

 



Signature:


If you appreciated my comments/responses please be sure to Like/Kudo them it really does make me smile 🙂 !
Link to the Power Platform Professionals United Kingdom User Group:

https://powerusers.microsoft.com/t5/Power-Platform-Professionals/gh-p/PowerPlatformProfessionalsUnit...

akosbanar
Advocate IV
Advocate IV

@AJ_Z 
Thank you for the opportunity but I think it is a Microsoft issue, at my company we realized more performance problems today and yesterday. 

The other thing that the code is working with Filter function what is the same as the Search just a little slower.

Some days later I check again it is still red underlined or already not.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (4,978)