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

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
Super User
Super User

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

13 REPLIES 13
Super User
Super User

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

AlexCretney
Level: Powered On

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. 

AlexCretney
Level: Powered On

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. 

AlexCretney
Level: Powered On

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

Super User
Super User

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.
AlexCretney
Level: Powered On

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

 

 

Super User
Super User

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.
AlexCretney
Level: Powered On

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

Super User
Super User

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
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 401 members 5,196 guests
Please welcome our newest community members: