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 / Trying to add a column...
Power Apps
Answered

Trying to add a column from another list to my dataset

(0) ShareShare
ReportReport
Posted on by 380
I am trying to use AddColumns to add a field to the Claims list called wma (Choice field in Sharepoint) from the Events list to create a collection - my code is:
 
it is giving me an error "The requested operation is invalid. Server response - Events failed. The field in Events is called theeventID and the field in Claims is eventID and they should match - I need to get the wma value from Events into my collection colClaims
 
thanks for any assistance!
Categories:
I have the same question (0)
  • Suggested answer
    abc 123 Profile Picture
    789 Moderator on at
    Assuming that you only want to return one column from the Lookup, then it should be in this syntax format:
     
    Lookup([ListName], [Criteria]).FieldNameToReturn
     
    Where the dot FieldnameToReturn is hanging off the outside of the Function() parens.
  • ronaldwalcott Profile Picture
    3,847 Moderator on at
    Why are you using wma.value? You can probably change it to wma if wma is a column name.
  • WarrenBelz Profile Picture
    153,779 Most Valuable Professional on at
    Try with a disambiguation operator - I assume wma is a Choice or Lookup column.
    ClearCollect(
       colClaims,
       AddColumns(
          Claims,
          thewma,
          LookUp(
             Events As _E,
             _E.theeventID = eventID
          ).wma.Value
       )
    ); 
    Set(
       varWait, 
       false 
    );
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    Buy me a coffee
  • Verified answer
    WarrenBelz Profile Picture
    153,779 Most Valuable Professional on at
    @bobgodin​​​​​​​
    A quick follow-up to see if you received the answer you were looking for or if you need further assistance. I believe from a subsequent post that wma is a Choice field.

    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    Buy me a coffee

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 93 Most Valuable Professional

#2
Haque Profile Picture

Haque 81

#3
Valantis Profile Picture

Valantis 49

Last 30 days Overall leaderboard