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 / Autofill dropdown/comb...
Power Apps
Answered

Autofill dropdown/combo box from Excel text value

(0) ShareShare
ReportReport
Posted on by 2

Hello all!

 

I am trying to autofill an app based on a single text input.

 

Example of functionality:  User enters an ID Number, if the record exists in the specified excel table,  fields will autofill.  I have no problem with anything except for choice values.

 

Issue:  I cannot figure out how to take a text value from excel and convert it to a choice/combo box value.  I have tried assigning variables but I think I got lost somewhere

 

Current variables set to OnVisible of Screen1

 

Set(varA, false);
Set(varB, false);
Set(varC, false);

 

 

Use entered ID Number to determine if coverage is A, B, or C.  This formula is located in OnChange of a previous, successfully autofilled item.

 

If(
 LookUp(
 Table1,
 DataCardValue13.Text = 'ID Number',
 Coverage
 ) = "A",
 UpdateContext({varA: true}),
 If(
 LookUp(
 Table1,
 DataCardValue13.Text = 'ID Number',
 Coverage
 ) = "B",
 UpdateContext({varB: true}),
 If(
 LookUp(
 Table1,
 DataCardValue13.Text = 'ID Number',
 Coverage
 ) = "C",
 UpdateContext({varC: true})
 )
 )
);
If(varA = true, UpdateContext({ComboBox1.Selected.Value: "A"}));
If(varB = true, UpdateContext({ComboBox1.Selected.Value: "B"}));
If(varC = true, UpdateContext({ComboBox1.Selected.Value: "C"}));

 

 Any help would be GREATLY appreciated.

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,532 Most Valuable Professional on at

    Hi @christiangeno ,

    I assume here you simply want the Combo Box DefaultSelectedItems auto-filled. You did not post the Items of the Combo Box, so I have assumed .Value as its output - you may have to change this. All you should need is this in the DefaultSelectedItems

    {
     Value:
     LookUp(
     Table1,
     'ID Number' = DataCardValue13.Text
     ).Coverage
    }

     

    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

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard