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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Trying to add a column...
Power Apps
Unanswered

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
    784 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 Super User 2025 Season 2 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,040 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,040 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard