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 / Change data card in Sh...
Power Apps
Unanswered

Change data card in SharePoint custom form to lookup value

(0) ShareShare
ReportReport
Posted on by 75

Hello,

 

I am fairly new to Power Apps and looking for assistance with changing an existing single line of text data card to a new lookup column on a custom form based on the selection of a customer number.

 

The form has two sources of data.

 

List A is the customer complaint list. List B is the customer list. List B contains the customer number and customer name.

 

The custom form has data card where the DefaultSelectedItems is a lookup to List B for the customer number. When the user is entering data on the form, he/she selects the customer number from the dropdown. The data is then stored in the customer number column in List A.

 

There is also a data card for the customer name which is currently a single of text in List A. The user manually enters the customer name into this field.

 

I have created a new lookup column in List A for the customer name. The column is getting information from List B and in the column is the customer name. 

 

I want to change the existing data card for customer name to the new lookup column. The purpose is so that the user will select the customer number from the dropdown and then the customer name will automatically populate based on the lookup of the customer number. The user will no longer manually enter the customer name and not have the ability to edit the field. It needs to auto populate.

 

Is this possible?   

 

I can't seem to get it working.  Thank you in advance for taking the time to assist me.

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    HI @Ungere ,]

    Why bother with a lookup column and all the complexities and restrictions that come with it in Power Apps. Simply look up list B for the customer name and use that as the Default of the control (and make it View Mode so the user cannot change it)

     

    Please click Accept as solution 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 Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Ungere Profile Picture
    75 on at

    That’s a possibly. What would be the syntax of Default?  Could you provide an example?

  • Verified answer
    WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    Hi @Ungere .

    It would be something like this

    LookUp(
     ListB,
     CustomerNumber = YourSelectedCustomerNumber
    ).CustomerName

    You can also simply get the list of customer numbers directly from ListB for your drop-down (rather than use a Lookup field)

    Sort(
     ListB.CustomerNumber,
     CustomerNumber
    )

    You would then be writing back to Text fields, which will have the best possibilities of avoiding Delegation issues. Apart from the complexities of (in particular) writing to Lookup columns, you cannot sort by them in a Delegable manner (nor use StartsWith with Delegation).

     

    Please click Accept as solution 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 Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

     

  • Ungere Profile Picture
    75 on at

    Hi. Thanks for the further details. I was able to use the lookup and it's working great.

     

    I tried using the sort for the customer number but it doesn't seem to like the syntax. I tried using what you suggested with

     

    Sort(
     ListB.CustomerNumber,
     CustomerNumber
    )

     

    Should I use the sort in the default of the control just like I did for the lookup?

     

  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    @Ungere ,

    Is that the actual field and list name - syntax works fine here on both Classic and Modern Combo Boxes. Also Customer Number needs to be a Text or Number field for that to work.

  • Ungere Profile Picture
    75 on at

    The list name is Customers and the column name is CustomerName. It's technically the 'Title' column. It is a text column.

     

    What would you use for the syntax using those names?

     

    Do I use the sort in the default of the control?

     

  • WarrenBelz Profile Picture
    153,034 Most Valuable Professional on at

    @Ungere ,

    That needs to be in the Items of the control.

  • Ungere Profile Picture
    75 on at

    That worked. Thank you for your invaluable assistance.

     

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