{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":38430,"path":"platform-administration/c_BPForStateFieldChoiceValues.md","title":"Configure state field choice values","bundle":null,"doc_type":null,"release":"australia","body":"\n# Configure state field choice values\n\nState fields are a subset of choice list fields. Keep the following information in mind when you configure choice values for the state field.\n\n-   Use a negative value to add a new active state field.\n-   Search for and study the business rules that use a state number filter on the **Script** and **Conditions** fields. You can use the Debug tool to trace the order of the business rule execution.\n-   New values representing inactive states should have a value above 8.\n\nYou can define any of the following attributes for a state field by configuring the dictionary. If the attributes are not defined, the system uses the default values. The TaskStateUtil API uses the following attributes. For more information on the TaskStateUtil API, see [TaskStateUtil](https://developer.servicenow.com/app.do#!/api_doc?v=paris&id=c_TaskStateUtil).\n\n|Attribute|Definition|\n|---------|----------|\n|close\\_states|Semicolon delimited list of state values that are inactive, used to identify whether the task should be set to active or inactive. This is a required attribute to use the TaskStateUtil functionality.|\n|default\\_close\\_state|Optional attribute to define the state value of the default close state if you want to define business rules that automatically close a task. Defaults to 3, typically Closed Complete if attribute is not defined.|\n|default\\_work\\_state|Optional attribute to define the state value of the default working state if you want to define business rules that automatically set a task for working. Defaults to 2, typically Work in Progress if the attribute is not defined.|\n\n## State modification examples\n\nFollow these examples for modifying the states of incidents and change requests.\n\n### Before you begin\n\nRole required: admin\n\n### Procedure\n\n1.  Navigate to **All** &gt; **System Definition** &gt; **Choice Lists**.\n\n2.  At the top of the list, construct a list filter like the following:\n\n    -   **Table**: incident\n    -   **Element**: incident\\_state\n3.  Run the filter.\n\n    Notice that the **Closed** state has a value of **7** and the **Resolved** state has a value of **6**. Any state greater than or equal to **7** is assumed to be inactive. Therefore, you should use a positive integer greater than **7** if you want to add a new inactive-type of state. Use a negative value like **-1** or **-2** if you wish to add a new active-type of state field, such as **Awaiting Vendor**.\n\n4.  Navigate again to **System Definition** &gt; **Choice Lists**.\n\n5.  At the top of the list, construct a list filter like the following:\n\n    -   **Table**: change\\_request\n    -   **Element**: phase\\_state\n6.  Run the filter.\n\n    Notice that the **Complete** state has a value of **8**. Any state greater than or equal to **8** is assumed to be inactive. Therefore, you should use a positive integer greater than **8** if you want to add a new inactive-type of state, such as **Cancelled**. Use a negative value like **-1** or **-2** if you wish to add a new active-type of state field, such as **Pending**.\n\n\n## Troubleshoot change states and business rules\n\nBusiness rules in the system make assumptions about state values. You can troubleshoot business rules to see the order in which they run and see how it affects changes you make to **State** field values.\n\n### Before you begin\n\nRole required: admin\n\n### Procedure\n\n1.  Navigate to **All** &gt; **System Definition** &gt; **Business Rules**.\n\n2.  Construct a filter like this one to view the scripts and conditions that pertain to the Resolved incident\\_state of 6 or the Closed incident\\_state value of 7:\n\n    The **Script** field contains 7 OR the **Condition** field contains 7 OR the **Script** field contains 6 OR the **Condition** field contains 6 AND the **Table** field is incident AND the **Active** field is true.\n\n\n### What to do next\n\nSee Debug Business Rule for information on how to trace the order of business rule execution. You can click **Debug All**, resolve an incident, and then check the trace at the bottom of form to watch the business rules execute. These two line examples show that the mark\\_closed business rule code is entered `==>` and then exited `<==`.\n\n```\n\n==> 'mark_closed' on incident\n<== 'mark_closed' on incident\n\n```\n\n"}}