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
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.

PWREduCon768x460.png

Join us at PWR EduCon - A Power Platform Conference

Learn from the top Power BI, Power Apps, Power Automate & Power Virtual Agents experts!

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