cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
amco
Regular 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
Resolver IV
Resolver IV

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
Resolver IV
Resolver IV

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

amco
Regular Visitor

Simple as that, thanks alot!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,692)