Hide state choice that are selected and display only state choice that are not selected/completed

Hari1
Mega Sage

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.

1 ACCEPTED SOLUTION

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.

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster

View solution in original post

8 REPLIES 8

Hi Hari,

If I'm understanding you correctly, what you are looking to do is have a situation where once an object has moved out of a state it can't go back.  That gets compounded by the idea that in the scenario you gave Architecture and Finance should remain visible  even though DevOps comes "after" them in your list.  If that's the case I'd suggest that you create true/false columns for each state and when an object moves out of that state, turn on the checkbox. That way when you load the object you can examine each checkbox and if it is true remove the associated option.  Doing that might be easier to do via business rules and an AJAX call from your on load client script.

 

If the approach makes sense to you and you need some help in setting it up please let me know.

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster

Hi John,

Thank you for your response. Can you help understand this "create true/false column for each state". What are you exactly refering to I have created a custom table which extends the task table. I have custom field call Project Status. In which i have the above state choices (New, Triage, etc..)

Can you please help me on how to achieve this?

Thanks.

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.

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster

Hi @johnfeist 

I was able to achieve this. Thanks a lot!!