web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Searching for each val...
Power Apps
Unanswered

Searching for each value in table from Split() result

(0) ShareShare
ReportReport
Posted on by 2

Hello, my Split() has an undetermined number of records. I need to use each of those string/record from Split(), to search and find a matching record in another table, and taking the data from another column.

 

Here's the code in PowerApps thus far:

 

Set(testIDstring, "1,2,3")
Set(testID, Split(testIDs, ","))
Set(testValues, ForAll(testID, SortByColumns(Filter(testTable, id = testID))

 

 

I'm not too sure how to continue from there on.

I have a code equivalent for better understanding:

 

 

testID = [1, 2, 3];
testValues = "";
testID.map((id) => {
 testValues += LookUpValue(table, column, id) + ",";
}

 

 

The LookUpValue() would be some method that looks up from the column from the table, get a matching record based on the ID, then return the data in the Value column for example.

Also, the variable `testValues` should not be a number, but rather of type string that appends every value from the matching record ID.

Over here, I'm using [1, 2, 3] or "1,2,3" as an example, but as mentioned on top, it could be 1 ID or 10 IDs.

 

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @ronaldmacdonald ,

     

    Please try:

     

    Set(testIDstring, "1,2,3");
    Set(testID, Split(testIDs, ","));
    Set(testValues, Filter(testTable, id in testID.Result))

     

    Best Regards,
    Wearsky

  • ronaldmacdonald Profile Picture
    2 on at

    Thanks for the help.

     

    Perhaps I wasn't too clear on what I wanted,

    I have x number of IDs from a Split(), that I need to search from a table.

    Each record in the table has 1 ID, so I need to search x number of times, and each of those times, I have to append to a string/variable the data another field from that record.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard