We will learn and understand the concept of Status & Status Reason fields in Power Apps / Model-Driven App. Before we start, make sure to subscribe to CRM Crate so that you can stay up to date in the field of Power Platform.
In the realm of Model-Driven Apps within the Power Platform, two crucial elements play a pivotal role in defining the lifecycle and progression of records: the Status and Status Reason fields. In this comprehensive guide, we will unravel the significance of these fields, exploring their individual roles, impact on user experience, and the power they bring to the management of data within Model-Driven Apps.
Understanding Status & Status Reason fields in Model-Driven App
At its core, the Status field in a Model-Driven App provides a high-level snapshot of the state of a record. It serves as an indicator of whether a record is currently Active or Inactive or in any other defined state. The Status field is integral to visualizing the overall status of records within the application.
While the Status field provides a general overview, the Status Reason field delves deeper, offering a more nuanced understanding of why a record is in a specific state. Think of it as the storyteller behind the Status, providing detailed reasons for the current condition of a record. This additional layer of information enhances transparency and aids users in making informed decisions.
The below table demonstrates the usage and concept of Status Reason & Status.
As shown in the above table, there are by default two Statuses which are Active & Inactive. Whereas there can be multiple Status Reasons in the system. The main concept of Status Reason is to link each Status Reason with a Status. This means that when the Status is Active, the system will only display the values “Not Started”, “On-Going” & “Completed” in form UI. Whereas, when the Status is Inactive, the system will display the values “On-Hold”, “Terminated”, “Lost”.
You can define new or existing Status Reasons and link it to their equivalent Status in the Power App solution explorer as given below.
What is Status Reason transition in Power Apps?
Status reason transitions provide an optional layer of filtering to specify the permissible changes in the status reason value associated with each status reason. Establishing a restricted list of acceptable options can simplify the process of selecting the appropriate subsequent status reason, especially when dealing with a multitude of combinations for valid status reason values.
In this example, we will apply the Status Reason transitioning on Case table. You have the flexibility to adjust the status reason column option sets within the Case table or custom tables, determining the available options for users. The only constraint is that every status reason option linked to an active status must provide at least one route to transition to an inactive status. Failure to adhere to this condition may lead to a situation where resolving or canceling the case becomes unfeasible.
Open the solution explorer (Classic Designer) >> Table >> Columns >> and open the Status Reason field in the editor. Over here you can see a button named “Edit Status Reason Transitions” as shown below.
Upon clicking this button, the Status Reason Transitions dialog presents the choice to enable Status Reason Transitions. Once enabled, it becomes necessary to specify the permissible status reason values for each status reason. To revoke the applied filtering, simply deselect the Enable Status Reason Transitions option. The defined transitions will be retained but will not take effect.
Refer the below Status Reason Transition scenario for our Case table:
- Merging a case is possible at any given moment, but it won’t be feasible if a status reason transition does not permit it.
- You can cancel an active case at any point.
- Once a case has been resolved or canceled, reactivation is not possible.
- Every case must progress through the following stages: In Progress > On Hold > Waiting for Details > Researching before reaching they can be Resolved. In this setup, it is not possible to set a case to an earlier status.