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

Is it possible to limit the options available in a choice field based on a condition?

Hi Guys, 

 

I am creating a SharePoint list form through PowerApps

 

Does anyone know if its possible to limit the possible options within a 'Choice' field based on a defined condition? 

 

The situation is that i'm building a Service Desk in a SP list. Each item (ticket) navigates a typical [Logged] > [Assigned] > [Resolved] or [Escalated] > [Closed] sort of flow.

 

When a ticket is assigned to the resolver... i want to limit the options they can select from this choice field to either [Escalated] or [Resolved] - If they pick any other value then its going to mess with a linked Workflow i have which is managing the notifications. 

 

So is something to the effect of either of the following possible?

 

  • If ticket is at 'Assigned' status then limit options in choice field to 'Resolved' or 'Escalated'
  • if tickets 'assigned to' value is [email address] then limit options in choice field to 'Resolved' or 'Escalated' 

Kind regards

Alex

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User II
Super User II

Re: Is it possible to limit the options available in a choice field based on a condition?

You can do this by updating the Items property of the status field control on the PowerApps form. Below is an example and you will need to change "PowerAppsDemo" to the name of your data source and "Status" to the name of your choice field in SharePoint.

 

This example will display only "Resolved" and "Escalated" when the currently saved status value is "Assigned", otherwise it will show all statuses.

 

If(Status.Value = "Assigned", 
   Filter(Choices(PowerAppsDemo.Status), 
      Value = "Resolved" || Value = "Escalated"),
   Choices(PowerAppsDemo.Status)
)


--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

14 REPLIES 14
Highlighted
Super User II
Super User II

Re: Is it possible to limit the options available in a choice field based on a condition?

You can do this by updating the Items property of the status field control on the PowerApps form. Below is an example and you will need to change "PowerAppsDemo" to the name of your data source and "Status" to the name of your choice field in SharePoint.

 

This example will display only "Resolved" and "Escalated" when the currently saved status value is "Assigned", otherwise it will show all statuses.

 

If(Status.Value = "Assigned", 
   Filter(Choices(PowerAppsDemo.Status), 
      Value = "Resolved" || Value = "Escalated"),
   Choices(PowerAppsDemo.Status)
)


--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Highlighted
Helper I
Helper I

Re: Is it possible to limit the options available in a choice field based on a condition?

Thats great - Thanks Jeff. I wont get a chance to try this until thursday but it looks like just what i need. 

Highlighted
Helper I
Helper I

Re: Is it possible to limit the options available in a choice field based on a condition?

Thanks Jeff.

 

Worked perfectly. You're the man. 

Highlighted
Helper I
Helper I

Re: Is it possible to limit the options available in a choice field based on a condition?

Hi Jeff,

 

Sorry but i have a followup issue. This worked perfectly for the SharePoint form. 

 

However this doesnt work with a companion phone app i am creating so i guess there must be some amendment required to the syntax? 

 

Kind regards

Alex

Highlighted
Super User II
Super User II

Re: Is it possible to limit the options available in a choice field based on a condition?

If the companion phone app is using the same list and fields and you are trying to do the same thing then formula should be the same as the one you have working in the SharePoint form. Are they the same or are trying to use the same formula in a different field or list?



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Highlighted
Helper I
Helper I

Re: Is it possible to limit the options available in a choice field based on a condition?

Hi Jeff,

 

I confirm that the data source is identical. I've pasted a screenshot below incase it helps 

 

PiccyWic.PNG

 

 

Highlighted
Super User II
Super User II

Re: Is it possible to limit the options available in a choice field based on a condition?

That looks good. What is the error you are getting?



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Highlighted
Helper I
Helper I

Re: Is it possible to limit the options available in a choice field based on a condition?

Hi Jeff,

 

I'm not presented with an error message, its just that the functionality doesn't work. When i'm in the edit screen of the app it lets me pick from all status options rather than those 2 i'm trying to limit it to. 

 

Kind regards

Alex

Highlighted
Super User II
Super User II

Re: Is it possible to limit the options available in a choice field based on a condition?

What is the Status value on the backend item (the saved item in SharePoint)?  The formula will show all choice values for a new item and any item which backend status value isn't "Assigned".



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,907)