- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 04:08 AM
Hi,
I got a state field in a Table with the following states New, Open, Acknowledge, Respond, Closed , Withdrawn etc. There are no validations/ approvals Required for a record to change the state , so I am thinking that a Flow is not required (state is changed manually). But I should only let the Processor to change from one state to few Particular states.
For Example, the processor can change the state from New to Acknowledge/Withdrawn and not to any other state
Acknowledge to Respond/open and so on.
How can I Proceed with this Requirement? Please pour your Insights.
Below is the attached Picture of state Transition Diagram.
Thanks in Advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 04:20 AM
There are a few ways to control changing state field. Couple that I feel that you might be able to use here are:
1. Check if the value changes and force it back to previous one if the user changing it is not allowed to do it.
2. Removing the options from users that are not allowed to move to them.
In option one you can add "g_form.setValue('state', oldValue)" if the user is not processor. Maybe alert that only processor can move from current state to new one.
In option two you could try g_form.removeOption('state', 'your_state_value') if the user is not processor.
They wouldn't see the option at all, so it might confuse users if they're not aware of your process.
In both cases you need to also make proper conditions so that the state is hidden or changed back in correct cases.
The client scripts don't work on list view, so people could still change the state from there. Generally there shouldn't be a need for that so you could also create an ACL that prevents modifying the state field from list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 04:20 AM
There are a few ways to control changing state field. Couple that I feel that you might be able to use here are:
1. Check if the value changes and force it back to previous one if the user changing it is not allowed to do it.
2. Removing the options from users that are not allowed to move to them.
In option one you can add "g_form.setValue('state', oldValue)" if the user is not processor. Maybe alert that only processor can move from current state to new one.
In option two you could try g_form.removeOption('state', 'your_state_value') if the user is not processor.
They wouldn't see the option at all, so it might confuse users if they're not aware of your process.
In both cases you need to also make proper conditions so that the state is hidden or changed back in correct cases.
The client scripts don't work on list view, so people could still change the state from there. Generally there shouldn't be a need for that so you could also create an ACL that prevents modifying the state field from list.