- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2023 12:16 AM
Hi,
I have a custom table and i have a requirement to hide the state choices which are completed. We have the states (New, Access, Triage, Work In Progress, Completed, On-Hold, Cancelled)
For example, If a state is moved from New->Access we need to hide the option New and if the state moves from Access->Triage we need to hide the state choices New, Access and display the rest of the state choices Triage, Work In Progress, Completed, On-Hold, Cancelled.
Can this be achieved? Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2023 02:21 PM
Hi Hari,
I could have sworn that I replied, but it's not showing so if this is a duplicate, so be it.
To add the true/false, go into one of the dictionary/table designer tools and simply add a true/false column for each state (e.g. New/u_new, Triage/u_triage, etc.) you don't need to display them on any forms.
Add a business rule, before update, that checks for a change of state. Have the business rule set the true/false for previous.state (e.g. New) to true. Let the rest of the update proceed.
Your on load client script can either use an AJAX call or display business rule to get a list of values to display or remove. From there you just go through the list making your adjustments.
Please let me know if you need any help in setting up the scripting.
:{)
Helpful and Correct tags are appreciated and help others to find information faster

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2023 05:04 AM
Hello @Hari1 ,
If you are aware of change management then you will get to know about change process.
Your requirement for custom table is same as change management process.
you can refer below code to set and hide state values.
code :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2023 08:53 AM
The states that i have is as below.
New
Triage
Discovery
Architecture
Finance
DevOps
Close
Cancel
On-Hold
Do we have add to any model on the change model or state model?
I have a scenario where I can move from New->Triage, Triage->Discovery, Discovery->DevOps
I should not be able to see the states New, Triage, Discovery in the state dropdown field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2023 05:51 AM
Hi Hari,
You mange what options are displayed via an on load client script. The easiest way to manage that is the way that it is done for incidents where the stored state values ascend as you move through them (e.g. 1 = new, 2 = in progress, etc.)
If you have a small number of states, you can simply have your on load client script check the current state value and depending on how you have the state values stored, just use g_form.removeOption() to take out those that are no longer available.
There are a number of other approaches that can be used to pass the available values into your on load client script. Please let me know if you need to go to that level.
:{)
Helpful and Correct tags are appreciated and help others to find information faster
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2023 09:11 AM
Hi @johnfeist
The states that i have is as below.
New
Triage
Discovery
Architecture
Finance
DevOps
Close
Cancel
On-Hold
I have a scenario where I can move from New->Triage, Triage->Discovery, Discovery->DevOps
I should not be able to see the states New, Triage, Discovery in the state drop down field.