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

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

How to Query and Accumulate a list from Split string?

(0) ShareShare
ReportReport
Posted on by 38

Hello,

 

I have the following string "A100,A101,A102". What I am trying to do is to split the comma separated string, lookup value on the list (sample below) based on the MatID and accumulate the values into one variable (60 in this example). 

 

So I thought of the following, but that didnt work because editor said i cant use Set inside ForAll. Any ideas? Thanks!

 

ForAll(Split("A100,A101,A102", ","), Set(myAccumulator, myAccumulator + LookUp(myList, matID=Result, MatValue))

 

MatIDMatValue
A10010
A10120
B10030
C10050
A10230
I have the same question (0)
  • Verified answer
    John_Martel Profile Picture
    38 on at
    Re: How to Query and Accumulate a list from Split string?

    It turns out it's as simple as adding the Sum function 🙂

     

    Sum(ForAll(Split("A100,A101,A102", ","), LookUp(myList, matID=Result, MatValue)), Value)

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 671 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 424 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 243

Last 30 days Overall leaderboard