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?
Kind regards
Alex
Solved! Go to Solution.
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) )
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) )
Thats great - Thanks Jeff. I wont get a chance to try this until thursday but it looks like just what i need.
Thanks Jeff.
Worked perfectly. You're the man.
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
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?
Hi Jeff,
I confirm that the data source is identical. I've pasted a screenshot below incase it helps
That looks good. What is the error you are getting?
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
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".
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
205 | |
187 | |
77 | |
49 | |
37 |
User | Count |
---|---|
319 | |
262 | |
124 | |
73 | |
58 |