cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jwelborne
Helper I
Helper I

Populate Field based on a Dropdown Text

I cannot get this to work

 

Here is a simple senario to illustrate the problem:

 

Created an Excel sheet with a single column named TestColumn.
Selected the Cell A1 and chose Insert > Table.
Checked my table has headers and clicked OK.
Renamed the table to TestSheet.
Saved the Excel sheet as DropDownTest.xlsx.
Logged into PowerApps.
Chose create.
Selected OneDrive for Business.
Selected my Excel sheet name DropDownTest
Chose the TestSheet table.
Clicked Connect.
PowerApps created the App.
I chose EditForm1 on EditScreen1.
I clicked on the card TestColumn.
Went to Advanced on the right.
Clicked on Unlock.
Inserted a Dropdowm Box into the Card.
I changed the Items to ["M","F"] and Default to Parent.Default.
I then deleted the TEXT INPUT field and changed Y and Height to Dropdown1.Y and Dropdown1.Height.
I selected the Card.
I then changed Update to Dropdown1.SelectedText and immediately got the Error "Expected Text value".

I get the same error if I use Dropdown1.Selected.

 

I am under a deadline so I quick answer would be greatly appreciated.

 

Thanks,

Jim

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
K-A-R-L
Solution Specialist
Solution Specialist

Hi @jwelborne ,

Can you please change your code to Dropdown1.Selected.Value

Thanks,
K-A-R-L


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
.

View solution in original post

I used Dropdown3.Selected.Result in place of Dropdown3.Selected.Value and it worked.

View solution in original post

7 REPLIES 7
K-A-R-L
Solution Specialist
Solution Specialist

Hi @jwelborne ,

Can you please change your code to Dropdown1.Selected.Value

Thanks,
K-A-R-L


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
.

View solution in original post

Thanks K-A-R-L.   I spent hourstrying to find out the correct syntax.

I tried this on another form and got the error: "Name is invalid. This identifier isn't recognized."

K-A-R-L
Solution Specialist
Solution Specialist

HI @jwelborne ,

Can you please try removing the datacard field and then add it back in to see if the error still happens.

To Remove:

Select Form > Properties > Fields (edit fields) > Remove field

 

To Add:

 

Select Form > Properties >  Fields (edit fields) > Add field

 

Thanks,
K-A-R-L


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

There is on thing different in the dropdown that doesn't work and that is it uses Distinct(CallersName,CallersName) in the items control.  The first CallersName is the name of a SharePoint list and the second CallersName is the name of the Field (column) in the SharePoint list.

Already did that.

 

There is on thing different in the dropdown that doesn't work and that is it uses Distinct(CallersName,CallersName) in the items control.  The first CallersName is the name of a SharePoint list and the second CallersName is the name of the Field (column) in the SharePoint list.

I used Dropdown3.Selected.Result in place of Dropdown3.Selected.Value and it worked.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (44,753)