cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate V
Advocate V

How to set a defult value from the picklist?

I have a form with "Unite price" field, this field is a currency and brings "Currency of Unit price" field which is linked to a picklist "CurrencyCode", by default this field shows the first item from the picklist, I can't find a way to chane this default condition.

 

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

hi @Lucas

 

By drop list, do you mean a dropdown?

 

If so, dropdowns have a Default property and you can set yours to "CAD" (with the double quotes)

 

Please let me know if this works.

View solution in original post

8 REPLIES 8
Highlighted
Community Support
Community Support

Hi @Lucas,

 

By default the PowerApps would pick the Nmae field from the Picklists as the Display Name, currently the display field can't be changed for Picklists, and there are threads already posted regarding whether the fields under Picklists could be changed, see:

https://powerusers.microsoft.com/t5/PowerApps-Forum/CDS-and-PowerApps-picklist-issues/m-p/20848

 

There is an idea submitted for this already:

PowerApps display the wrong field for picklists

Please vote or add comments for this idea, and if this does not meet your requirements, then please submit your idea in the idea forum.

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

Regards

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted

Hello @v-micsh-msft,

 

Thank you for your answear. I think you are referring to the DisplayName property, but what I want to do is make the droplist to have an item selected by default, so if the user don't select anything that option will be selected.

 

More specific for my app, I have two requiered fields:

  1. the "price" field ( Which is the field I created in my entity in the CDS, and I setted it as a currency)

  2. the "currency of the price" field( This is a requierd field that appear when I setted the other field as a currency and is linked to it)

 

The "currency of the price" is a drop list which is linked to the picklist "CurrencyCode", the first item listed in the picklist is USD, I think that is whay my default value in the droplist is USD, but I want it to be CAD. That way, the user only have to submit the price and don't worry about the currency unless it's different from CAD.

 

Regards

 

Highlighted
Community Champion
Community Champion

hi @Lucas

 

By drop list, do you mean a dropdown?

 

If so, dropdowns have a Default property and you can set yours to "CAD" (with the double quotes)

 

Please let me know if this works.

View solution in original post

Highlighted

Hi @Meneghino,

 

You were right, I thought you had to called it from the picklist, I was overthinking.

 

Thank you

Highlighted
Community Champion
Community Champion

Overthinking is always better than underthinking 🙂

Glad to help.

Highlighted

Hello @Meneghino,

 

I was working on other Dropdown, but this one has choice base on a colum from an entity, so right now in default it says ThisItem. Vendor and I have value1 and value2 to show the name of the Vendor and the ID of the vendor, that allows me to select the vendor I want, but agian I need to have a default vendor.

 

I want to have a Vendor "TBD" selected by default, that vendor is included in the Vendor entity and has it own unique Vendor ID, but when I tried to called with Quotation like in the case of the currency, it brings and error saying that  "the property expects record values, but this rules produce incompatible text values".

 

then, I tried to called it as a lookup pointing to the vendorID, but still shows the same error.

Highlighted
Community Champion
Community Champion

Hi Lucas, I think there are two different types of dropdowns in PowerApps.

 

1) Ones that show one value (i.e. just VendorName or just VendorID) but not both, an these are the ones that you can create normally. I this case the Default is a value, i.e. a string or a number

 

2) Drodowns that show 2 values, that I think are generated in data cards for choice fields or something like that.  Since I do not use forms I have never come across this type in my work.  However, the problem seems clear, the Default is a record of probably two values.  Assuming that the name of the fields is value1 and value2, then this record would be something like {value1: "TBD", value2: 0} or if the actual field names are used, {Vendor: "TBD", VendorID: 0} or something like it.  This is why the Default property expects a record.

 

Please let me know how you get on and what actually works.

Highlighted

Hi @Meneghino,

 

You are right, there is 2 types of dropdown control, and they have different properties.

 

What I did was find a way to call the record in a different why than a lookup and put it in the default of the dropdown control.

 

1. I leave the parent default the way it came.

2. I went to the dropdown control and look for the defualt property which is normally set to parent.defualt and change it for this:

 

  First(Filter(EntityName,ColumnName = "Recordwanted"))

 

and It works.

 

I don't know why the lookup didn't work, but this  formula does pretty much the same.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,499)