Need a Wait Script for a condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2014 11:45 AM
Hey everyone,
I'm not a scripter but I am looking for a script which I can place in a workflow "Wait for Condition".
I am trying to have a script meet the condition of requiring my change management fields Change Plan, Backout Plan, Test Plan be completed before the change can move to the next level which is for approval. If a Change Plan, Backout Plan and Test Plan the script should notify the requestor via a popup screen that these fields need to be completed before it can move on to the next step of the workflow.
Any help would be greatly appreciated. If I need to better explain please let me know.
Thanks,
Domenic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2014 12:04 PM
Your "Wait for Condition" in the workflow will control the process for that change.
The pop up for the user should be controlled via client script.
Utiliz:
gs.addInfoMessage(' these fields need to be completed before it can move on to the next step of the workflow');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2014 12:14 PM
Don't I have to have a script within the wait condition to tell it to look for the specified fields be completed? I need to have the specified fields completed before it moves to the next step of the workflow.
Where do I place the client script? As I mentioned not a scripter also not a developer...
thank you very much for your input!
domenic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2014 12:36 PM
Regarding the wait condition in the workflow. no scripting is necessary, simply adjust the condition via the drop down. Use the name's of your target fields in place of "sponsor".
The client script is a little more involved. But, luckily, just a little:
Type: OnSubmit
Script should work by substituting your field names and your custom error msg:
function onSubmit() {
if (g_form.getValue("field_1") == "" || g_form.getValue("field_2") == "" || g_form.getValue("field_2") == "" ||){
gs.addInfoMessage('Your error message here');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2014 01:16 PM
Please forgive me being such a novice and asking what may be silly questions.
Where do I insert the script? I hate to ask but I just need brief step by step.
Now as far as the condition item.. Viola! It worked and its awesome!!!! Just need to get the above client script working.
Thank you!
Domenic