cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Unable to add All with CDS entity option set on Model App

I have created a CDS Entity with option set as column data type. It is able to show all the values in model app new or edit form, but not able to add "All" to the same dropdown or combobox. If I try to add it to collection, it shows All in one column and option set values in another column.

 

And below code is giving error

 

ClearCollect(p1,{Result:"All"});
Collect(p1, Distinct('Property Inventories','Project Name'))
4 REPLIES 4
Highlighted
Advocate I
Advocate I

Re: Unable to add All with CDS entity option set on Model App

@gaurav_sharmaif you have an option set field for a custom entity as long as that entity is added to the app select the Items property and use:

 

choices('Name of Field')

 

Thanks.

 

Doug

 

Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up

Highlighted
New Member

Re: Unable to add All with CDS entity option set on Model App

@Doug_Apicella I want to add "All Items" to the dropdown to show all records. This is not happening.

Highlighted
Advocate I
Advocate I

Re: Unable to add All with CDS entity option set on Model App

@gaurav_sharmaIf you want to add additional values you would have to build the entire collection manually specifying the optionset values each as a record and then adding the "All Items" value as well. Thanks.

 

Doug

 

Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up

Highlighted
New Member

Re: Unable to add All with CDS entity option set on Model App

I did. Please check my original question. I wrote that code is not working.

 

Below code is not working. It is giving error while defining in formula bar.

 

ClearCollect(p1,{Result:"All"});
Collect(p1Distinct('Property Inventories','Project Name'))
 
Or is there a way to select all values or none in dropdown or combobox control after it is populated from CDS entity optionset values? This will work too.

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (4,936)