cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SumanKoduri
Helper V
Helper V

How to use Search for different textboxes and columns

I want to search 2 columns based on 2 textinputs 

 

Search('[GLOBUS_APP].[V7110_CASE_REQ_FAM_DETAILS]', TextInput2_1.Text,"C207_SET_ID") || Search('[GLOBUS_APP].[V7110_CASE_REQ_FAM_DETAILS]', TextInput2.Text,"FIELD_SALES_NAME")

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

HI @SumanKoduri ,

Could you please share a bit more about your scenario?

Do you want to filter your 2 columns based on 2 Text Inputs at same time within your Data Table? Or just filter your data table records based on the typed search text within the Two Text Inputs?

 

Based on the needs that you mentioned, I think the Filter function could achieve your needs. I have made a test on my side, please consider take a try with the following workaround:

Set the Items property of the Data Table to following:

Filter(
       '[GLOBUS_APP].[V7110_CASE_REQ_FAM_DETAILS]',
       If(
          IsBlank(TextInput2_1.Text) || TextInput2_1.Text = "",
          true,
          StartsWith(C207_SET_ID, TextInput2_1.Text)
       ),
       If(
          IsBlank(TextInput2.Text) || TextInput2.Text = "",
          true,
          StartsWith(FIELD_SALES_NAME, TextInput2.Text)
       )
)

Note: The above filter formula would filter your Data Table records only when you type search text within any one or both of the Two Input Boxes, otherwise, it would display all records from your data source within the Data Table.

 

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

Search('[GLOBUS_APP].[V7110_CASE_REQ_FAM_DETAILS]', TextInput2_1.Text,"C207_SET_ID","FIELD_SALES_NAME")

I need to search Set id based on Text box 1 and FIELD_SALES_NAME based on Text box 2
 
 

Are you filtering a gallery?

No for Datatable

v-xida-msft
Community Support
Community Support

HI @SumanKoduri ,

Could you please share a bit more about your scenario?

Do you want to filter your 2 columns based on 2 Text Inputs at same time within your Data Table? Or just filter your data table records based on the typed search text within the Two Text Inputs?

 

Based on the needs that you mentioned, I think the Filter function could achieve your needs. I have made a test on my side, please consider take a try with the following workaround:

Set the Items property of the Data Table to following:

Filter(
       '[GLOBUS_APP].[V7110_CASE_REQ_FAM_DETAILS]',
       If(
          IsBlank(TextInput2_1.Text) || TextInput2_1.Text = "",
          true,
          StartsWith(C207_SET_ID, TextInput2_1.Text)
       ),
       If(
          IsBlank(TextInput2.Text) || TextInput2.Text = "",
          true,
          StartsWith(FIELD_SALES_NAME, TextInput2.Text)
       )
)

Note: The above filter formula would filter your Data Table records only when you type search text within any one or both of the Two Input Boxes, otherwise, it would display all records from your data source within the Data Table.

 

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.

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.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (3,125)