cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tested1
Level: Powered On

Hiding one choice in a drop down column

Hello

 

I have a column called test with a drop down list. I have a sharepoint list for users to fill in to request something.

 

I want to manually put in older requests so one option in column 'test' drop down is 'Legacy'. This is used for all old requests.

 

I want to hide this 'Legacy' choice in the drop down. So: from choice 1, choice 2, legacy it should only show choice 1 and choice 2. Legacy will be hidden

 

Before:             After

Choice 1          Choice 1

Choice 2          Choice 2

Legacy             Blank - Legacy option will be hidden from user)

 

 

Is there any way to hide this one single choice in a drop down column? The items are choices in the powerapps field. so Choices.Listname.Column name

 

Thank you 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Hiding one choice in a drop down column

@tested1 

Might also try:

   Filter(Choices(yourDataSource.Brand, !StartsWIth("Legacy"))

 

Just in case there are some "non-space" characters in that space.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

6 REPLIES 6
Super User
Super User

Re: Hiding one choice in a drop down column

Hi @tested1 

You should be able to filter out your Legacy choice by calling the Filter function. The Items property of your drop down control would look like this:

 

Filter(Choices(Listname.Fieldname), Value <> "Legacy")

With SharePoint, the Choices function returns a table with 2 fields - Id and Value. That's the reason why we filter on Value.

 

tested1
Level: Powered On

Re: Hiding one choice in a drop down column

HI @timl 

 

Thank you for the reply, 

 

Brilliant! I believe it works. Just testing it out now

Highlighted
tested1
Level: Powered On

Re: Hiding one choice in a drop down column

Hi @timl 

 

For some reason my form is being weird and it has stopped working. I am using look up columns. 

 

So I added the choice 'Legacy (LEG)' to my look up master list, and then refreshed the data source.

 

The legacy (LEG) choice shows when I click new item and select the drop down.

 

I added the formula you said in the Items box on the choices data card. It all accepts but for somereason it does not filter and Legacy (LEG) still shows. Any ideas :)? I put a pic below of what I have. I think the data sources /choices is messing up . very strange.

 

 

image.png

Super User
Super User

Re: Hiding one choice in a drop down column

@tested1 

Might also try:

   Filter(Choices(yourDataSource.Brand, !StartsWIth("Legacy"))

 

Just in case there are some "non-space" characters in that space.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

Super User
Super User

Re: Hiding one choice in a drop down column

Hi @tested1 

This is strange.  In addition to @RandyHayes's suggestion......

 Filter(Choices(yourDataSource.Brand, !StartsWIth("Legacy"))

I would also try to diagnose this by adding a temporary data table onto your screen. If you set the Items property of this to .....

Filter(Choices(Listname.Fieldname), Value <> "Legacy (LEG)")

Does it filter out the "Legacy (LEG)" choice in the data table?

 

 

SchneidAIR
Level: Powered On

Re: Hiding one choice in a drop down column

This is working for one Choice value, but i have to conditionally hide some value from the choice.

The Status-Value "Closed" in my Status-Column "bimStatus" (SharePoint Choice) should only be available when the actual status of the Item is "Solved"

 

bimStatus.Items:

 

If(bimStatus.Value<>"Solved",Filter(Choices([@Incidents].bimStatus),Value<>"Closed"))

 

 

This does not work in Preview and FormMode

 

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (6,852)