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

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
Highlighted
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
Highlighted
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.

 

Highlighted
Helper V
Helper V

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

Helper V
Helper V

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

Highlighted
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

Highlighted
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?

 

 

Highlighted
Advocate II
Advocate II

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
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,105)