cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RyoIshi731
Helper IV
Helper IV

Search multiple conditions from Sharepoint with output to Gallery

Hi 

 

I would like to implement search function.

The specification is like this.

 

I put 2 items to search.  TextInput1_1 and StatusFlag(Toggle Button).

Data is in "MaintenanceReport" in SharepointList and having columns

 "CustomerName",

 "EngineerName",

 "Status"

 

 "CustomerName" and  "EngineerName" should be searched by TextInput1_1  (Or Condition)

 "Status" should be matched by StatusFlag

 TextInput1_1 and StatusFlag is And condition for searching.

 

RyoIshi731_0-1635311476644.png

 

I write like this for Gallery item. However it doesn't work.

Many error happens in all gallery items.

 

Filter(
 MaintenanceReport,
 TextInput1_1.Text in Engineer.DisplayName || TextInput1_1.Text in CustomerName.Value And Status.Value="1.Open"
  ),Filter(
  MaintenanceReport,
  TextInput1_1.Text in Engineer.DisplayName || TextInput1_1.Text in CustomerName.Value

)

 

Error messages

RyoIshi731_1-1635316770939.png

 

I would really appreicate you if you could help me solve this.

1 ACCEPTED SOLUTION

Accepted Solutions

@RyoIshi731 Try this,

Filter(
 MaintenanceReport,
 (TextInput1_1.Text in Engineer.DisplayName || TextInput1_1.Text in CustomerName.Value) && Status.Value="1.Open"
  )

View solution in original post

5 REPLIES 5
CNT
Super User
Super User

@RyoIshi731 What are the datatypes of the following columns in the SP list?

 "CustomerName",

 "EngineerName",

 "Status"

Hi @CNT    Thank you for contact.

 

 "CustomerName": Choice

 "EngineerName" : M365User

 "Status": Choice

 

Regards

@RyoIshi731 Try this,

Filter(
 MaintenanceReport,
 (TextInput1_1.Text in Engineer.DisplayName || TextInput1_1.Text in CustomerName.Value) && Status.Value="1.Open"
  )

@CNT 

 

Thank you so much.

 

Your code works.  And I modified like this.

If(
StatusFlag.Value = true,
Filter(
MaintenanceReport,
(TextInput1_1.Text in KDDI_Engineer.DisplayName || TextInput1_1.Text in CustomerName.Value) && Status.Value = "1.Open"
),
Filter(
MaintenanceReport,
TextInput1_1.Text in KDDI_Engineer.DisplayName || TextInput1_1.Text in CustomerName.Value
)
)

@RyoIshi731 Glad to help!

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

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,778)