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 / add one column value f...
Power Apps
Answered

add one column value from one list to another

(0) ShareShare
ReportReport
Posted on by 10

I'm in the process of of building a tool tracking app. I have two Sharepoint lists: User Data and Tools Data. I want to have a button in my app that takes two inputs: Badge ID and Tool ID. I want to take the text input from Badge ID  and check for the name associated with the badge ID from my user data list. I want to then take that name found in User Data and append it to the user column of the record with the respective Tool ID entered in the text input.

 

I have been unsuccessful to connect those two lists to complete this action. Any help would be appreciated!

Categories:
I have the same question (0)
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @spencerham,

     

    Would you like to fill in & overwrite the User column or append to it (e.g. User1; User2; User3)?

     

    Option 1 would include a Patch and 2 LookUp functions:

    Patch(
     'Tool Data',
     LookUp(
     'Tool Data',
     //If Tool ID is a text field, remove the Value() function
     //Change TextInputToolID to the correct name
     'Tool ID' = Value(TextInputToolID.Text)
     ),
     {
     User: LookUp(
     'User Data',
     //If Badge ID is a text field, remove the Value() function
     //Change TextInputBadgeID to the correct name
     'Badge ID' = Value(TextInputBadgeID.Text)
     ).Name
     }
    )

     

    Option 2 would involve a small adjustment in order to append & not overwrite the value:

    With(
     {
     lookUpRecord: LookUp(
     'Tool Data',
     //If Tool ID is a text field, remove the Value() function
     //Change TextInputToolID to the correct name
     'Tool ID' = Value(TextInputToolID.Text)
     )
     },
     Patch(
     'Tool Data',
     lookUpRecord,
     {
     Title: lookUpRecord.User & "; " & LookUp(
     'User Data',
     //If Badge ID is a text field, remove the Value() function
     //Change TextInputBadgeID to the correct name
     'Badge ID' = Value(TextInputBadgeID.Text)
     ).Name
     }
     )
    )

    Adjust the code / names where necessary.

     

    If this solves your question, would you be so kind as to accept it as a solution.

    Thanks!

  • spencerham Profile Picture
    10 on at

    An error comes up claiming "Incompatible types for comparison These types cant be compared: Error, Text.". Both are text fields, so I'm not sure what its referring to. 

  • LaurensM Profile Picture
    12,516 Moderator on at

    @spencerham

    The second LookUp function does not have a capital U. Could you check whether that fixes the issue? 🙂

  • spencerham Profile Picture
    10 on at

    Unfortunately that did not fix the issue. Still receiving this error. 

  • LaurensM Profile Picture
    12,516 Moderator on at

    @spencerham,

     

    Would it be possible to show a screenshot of the formula bar in edit mode? When you click in the formula bar, as if you were to edit the code, the error should be underlined red. Since 'User1' does not sound familiar, I am interested in what particular piece of code is causing the issue.

     

    Thanks in advance!

  • spencerham Profile Picture
    10 on at

    I'm not sure where User1 is coming from either. Error is coming from within the curly braces. Does it need an !IsBlank() so It's not pulling a empty entry and comparing it to the Lookup()? 

  • LaurensM Profile Picture
    12,516 Moderator on at

    @spencerham 

     

    It does not seem to like the .'Name' - Is this a regular text field within SP?

    What you could try to do is remove the .'Name', write the dot again and see what Power Apps recommends.

  • spencerham Profile Picture
    10 on at

    .'Name ({Name})' solved it. Thanks!

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 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard