Hi,
Quite the novice in PowerApps, and I have some code in my App which works fine, but I am aware that it can likely be improved/tidied up.
The code is;
If(cb_action_to_take.Selected.Value = "Reject Commission",UpdateContext({loc_AppRej:true}), cb_action_to_take.Selected.Value = "Approve Commission",UpdateContext({loc_AppRej:true}),cb_action_to_take.Selected.Value = "Request more info",UpdateContext({loc_more_info:true}), cb_action_to_take.Selected.Value = "Add to KIV", UpdateContext({loc_add_to_KIV:true}), cb_action_to_take.Selected.Value = "Approve Consultation", UpdateContext({loc_consultation_AppRej:true}), cb_action_to_take.Selected.Value = "Reject Consultation", UpdateContext({loc_consultation_AppRej:true}), cb_action_to_take.Selected.Value = "Add to Workplans", UpdateContext({loc_add_to_WP:true}))
So, cb_action_to_take is a Combobox pulling from my 'Status' column (Choice) in a SharePoint List.
The quoted text, e.g. "Reject Commission" is the names of the choices, then the UpdateContext triggers an individual popup depending on which choice is selected in the combobox.
As I mentioned, quite a novice and thinking this code could be improved/tidied up.
Any ideas what a better (potentially more dymanic) way to code this would be?
Thanks.