cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
larspeterson
Advocate II
Advocate II

CDS Picklist Dropdown Allow Blanks and Show Blank if No Value

I have a form that shows the item selected in a gallery. One of the fields is a custom picklist dropdown (High, Moderate, Low). Currently, all the items in the CDS have no value for this field. However, when I load an item into the form it defaults to "High". I would prefer it show a blank and I would like a blank option in the dropdown. Is this possible or do I have to hack my way into making this work? 

1 ACCEPTED SOLUTION

Accepted Solutions
larspeterson
Advocate II
Advocate II

For any that are curious, my solution has been to create a new Entity called Lists. This entity consists of a description field and then a boolean field for each picklist I want to create. I have allowed blank values for the description field and my first entry in the entity is a blank description field with all boolean values set to true, so it will be in every dropdown.

 

For instance, in the standard Product entity I created a relationship to lists and named it Quality. Then, in my form I delete the lookup dropdown and input a custom dropdown with ProductForm.Items = Filter(Lists, HighModLow = true)


Here is the an excerpt of the Lists table I am referring to:

 

Primary ID 

Description

 HighModLow

000001

 

True 

000002 

high 

True 

000003 

moderate 

True 

000004 

low 

True 

 

I hate hacks, but it is better than not being able to accomplish what I need!

View solution in original post

3 REPLIES 3
v-yamao-msft
Community Support
Community Support

Hi larspeterson,

 

What do you mean by “all the items in the CDS have no value for this field”? I am not sure with this sentence.


I create several Picklist columns in a custom entity, then create an app based on it.
Both on Edit Form and Display Form, there are default values for each Picklist column.
So it might be not possible to show blank option in the dropdown.

 

A screenshot of my app, on the Edit screen, all the Picklist columns are showing their default value.

1.png

 


Best regards,
Mabel Mao

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

Thanks for your efforts. What I mean by “all the items in the CDS have no value for this field” is that, in the Common Data Service, there are no values in the picklist field for each record. In other words, each record actually has no value for that field. In other words, even though the record has no entry, when I pull the record into the form, it shows up as if "high" were selected.


I wanted to see if I got any easy answer, but I suspect this is not supported yet. I am instead going to create a collection with each picklist and add a blank value, then set the items for the dropdown to the created collection. This is not an ideal solution as I have to manually recreate the picklist and if I ever change the picklist, I will have to update the app. Any other ideas? I can't find a way to collect a picklist. 

larspeterson
Advocate II
Advocate II

For any that are curious, my solution has been to create a new Entity called Lists. This entity consists of a description field and then a boolean field for each picklist I want to create. I have allowed blank values for the description field and my first entry in the entity is a blank description field with all boolean values set to true, so it will be in every dropdown.

 

For instance, in the standard Product entity I created a relationship to lists and named it Quality. Then, in my form I delete the lookup dropdown and input a custom dropdown with ProductForm.Items = Filter(Lists, HighModLow = true)


Here is the an excerpt of the Lists table I am referring to:

 

Primary ID 

Description

 HighModLow

000001

 

True 

000002 

high 

True 

000003 

moderate 

True 

000004 

low 

True 

 

I hate hacks, but it is better than not being able to accomplish what I need!

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

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,398)