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"
  )

View solution in original post

@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
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (3,310)