# Do you have an option to control next possible state display based on Additional field value of record?

**URL:** <https://community.sapphireims.com/t/do-you-have-an-option-to-control-next-possible-state-display-based-on-additional-field-value-of-record/498>\
**Category:** State Machine and Workflow\
**Tags:** how-to\
**Created:** [March 29, 2021, 11:26am UTC](https://community.sapphireims.com/t/do-you-have-an-option-to-control-next-possible-state-display-based-on-additional-field-value-of-record/498 "2021-03-29T11:26:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sofan](https://avatars.discourse-cdn.com/v4/letter/s/48db29/32.png) [@Sofan](https://community.sapphireims.com/u/Sofan)\
**Post date:** [March 29, 2021, 11:26am UTC](https://community.sapphireims.com/t/do-you-have-an-option-to-control-next-possible-state-display-based-on-additional-field-value-of-record/498/1 "2021-03-29T11:26:24Z")

</div>

Yes, it is possible. Since this needs workflow script, please reach out to our support team to get this enabled.

The Workflow script will be placed in locaiton : [SapphireIMS Installed location]\SapphireIMS\WebManagement\SapphireWorkflowScripts.

Just to share an example:

If the VPI field value is ‘Yes’, and if you have a workflow which has 2 states from New (New-\>Assign, New-\>Waiting for Approval) and you want ‘Assign’ state to be displayed only when the VIP field value is ‘Yes’. To achieve this, copy the ‘SampleWorkflowEngineConfiguration.properties’ and paste it in above folder and rename with some unique name. And place the below content in the script (Where 6 indicate VIP field ID).  
FieldType=Additional Field  
condition=And  
FieldIDs= 6  
FieldID\_6\_Value=Yes

This script has to be used in sd\_workflowmaster database table and you may take help from our support team to enable.
