cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
amco
Frequent Visitor

Multiline search and filter results

Hi,

 

I have a Sharepoint list with data where the ID is unique.

I want to enter a bunch of IDs into a multiline input box (separated by row), then have the data compared to the Sharepoint list and write out the information to a gallery, if found. 

 

So I want it to look like this:

amco_0-1630063865382.png

 

The picture above only works with 2 IDs as I use First and Last to filter the gallery. 

 

 

 

Filter(IDs, 'Created By'.DisplayName = "admin", 
StartsWith(Title, 
    First(Split(MultiScan.Text, Char(10))).Result) 
|| 
StartsWith(Title, 
    Last(Split(MultiScan.Text, Char(10))).Result))

 

 

 

 

How can I get the same functionality but if I have more than 2 IDs? 

I tried to use ForAll, but it didn't populate the data fields, it only created the rows in the gallery. I guess because I still use First to get the data out of the Split?

 

amco_2-1630064162061.png

 

 

 

Filter(IDs, 'Created By'.DisplayName = "admin", 
StartsWith(Title, 
    First(Split(MultiScan.Text, Char(10))).Result) 
|| 
StartsWith(Title, 
    Last(Split(MultiScan.Text, Char(10))).Result))

 

 

 

 

Any help in the correct direction would be helpful. I've come to the point where I'm not sure if this can even be done in powerapps?

1 ACCEPTED SOLUTION

Accepted Solutions
shoog
Super User
Super User

Using the in function you should be able to achieve this like below:

Filter(IDs, 'Created By'.DisplayName = "admin", 
Title in Split(MultiScan.Text, Char(10)).Result)

View solution in original post

2 REPLIES 2
shoog
Super User
Super User

Using the in function you should be able to achieve this like below:

Filter(IDs, 'Created By'.DisplayName = "admin", 
Title in Split(MultiScan.Text, Char(10)).Result)
amco
Frequent Visitor

Simple as that, thanks alot!

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 (2,253)