Skip to main content

Notifications

Power Apps - Building Power Apps
Suggested answer

Auto Populate Fields on selection of Customer Name

(1) ShareShare
ReportReport
Posted on by 236
Hi,
 
See below table for reference.
 
I'm looking to auto populate the Code fields into the form as per customer name selection. We'll be naming all the fields with the code names mentioned in "Code" column into SharePoint which will act as Cascading dropdowns.
 
Customer Name Code
Apple WB0017  
Apple WB0018  
Apple WB0019  
Apple WB0020  
Apple WB0021  
Apple WB0023  
Apple WB0022  
Apple WB0024  
BlackBerry WB0025  
BlackBerry WB0026  
BlackBerry WB0027  
 
For Instance: when we select Apple from Customer Name field, than WB0017 to WB0024 fields should get visible and than allow users to enter values only for this fields.
 
Similarly when BlackBerry is selected, WB0025 to WB0027 fields should get visible and than allow users to enter values for this fields.
 
Any ideas how we can achieve this. Thanks!
  • cfoenki Profile Picture
    cfoenki 90 on at
    Auto Populate Fields on selection of Customer Name
    Hi,
     
    Sorry for late reply, I forgot to activate the notification of replies ...
    Can you share the full sharepoint architecture and your application form architecture and your formula? Espescially where you have a red mark on the formula.
    The screenshot you provided is truncated.
  • Prem4253 Profile Picture
    Prem4253 236 on at
    Auto Populate Fields on selection of Customer Name
     
    Please if you can advise further. I'm still not able to fix this.
     
    Below is my SharePoint list (used for LookUp)
     
    I've added a field (DataCardValue26) into my form.
  • Prem4253 Profile Picture
    Prem4253 236 on at
    Auto Populate Fields on selection of Customer Name
     
    Your post fulfills my end, but when I'm adding the code to my form, it is giving the error and I'm also not able to select last  syntax of the formula.
     
     
    My Supplier Name field shows Distinct Names (have used the below code in Items property)
    Sort( Distinct('SupplierDetails',Title),Value) ------- SupplierDetails is the SharePoint list name
     
    Cold Rolled Steel is a text column added from a SharePoint list (named as Commodities)
     
    Can you please advise. Thanks!
  • Suggested answer
    cfoenki Profile Picture
    cfoenki 90 on at
    Auto Populate Fields on selection of Customer Name
    Hi, if I summerize, you have a list of correspondance between custom names and field codes and another list with field codes as column names.
     
    I just tried and here is the result
     
    If it is what you need, in your form you need to add the following code in the "Visible" property of each field with a code:
    LookUp(AppleBlackBerry,Code=Self.DisplayName).Title=First(DataCardValue12.SelectedItems).Value
     
    In my example my correspondance list is AppleBlackBery and I lookup inside the column code and verify if the return value for Customer Name (in my example column Title) is equal to the Customer Name filled in the app.
    It only works if a field code is assigned to only one Customer Name.
    If not, you need to add another formula:
    !IsBlank(LookUp(Filter(AppleBlackBerry,Code=Self.DisplayName),Title=First(DataCardValue12.SelectedItems).Value))
  • nleuck_101 Profile Picture
    nleuck_101 262 on at
    Auto Populate Fields on selection of Customer Name
    This is what I use. Hope it helps. The sort is only if you want to sort your Code column and the Distinct is if you have duplicate values. If you don't need them you should be fine with just the Filter part.

    Sort(
           Distinct(
                  Filter(
                      SharePoint List name,
                      'Customer Name'.Value = ComboBox.Selected.Value (or it could be a dropdown)
                  ),
                  Code
            ),
            Value
    )
  • Suggested answer
    mmbr1606 Profile Picture
    mmbr1606 10,320 on at
    Auto Populate Fields on selection of Customer Name
    hey
     
     
    this vodeo should answer all questions:
     
     
     
    if it worked please mark as verified
     
     
    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

Kickstarter Events…

Register for Microsoft Kickstarter Events…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #13 Writing Effective Answers…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,858

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,505

Leaderboard