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-06-2014 04:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2014 05:40 AM
Ok I get it now!
One more item if you don't mind. Now that I know how to set a condition and a client script I need to put this al together.
Where I am having an issue is that I have a process where:
Step 1 - Requestor for change submits request - Only has minimum required fields. The change, backout and test plan are not required fields because the requestor is just requesting a change and not implementing. The requestor sets the assignment group.
Step 2 - An assignment group see the new change ticket and someone within the group will assign it to themselves.
Step 3 - The person in the assignment group who the change is assigned to now has work and complete the change ticket by filling in the Change, Backout, and Test plan on the form. So at this point I want these 3 fields to be mandatory.(They are not mandatory when the requestor creates the change request)
Step 4 - I have put in a workflow wait for condition (thanks to you!) which will not allow the workflow to continue unless the 3 fields Change, Backout, and Test are filled in. Once they are filled in then the workflow will continue to the next level which is approval of the change by a designated approval group.
The workflow condition works without an issue( If the Change, Backout and Test Plan fields are not completed the next step is does not move to the next step of approval). However the issue I am having is within Step 3. I can't seem to make a popup via a client script which will only function on the UPDATE of the change which will notify the user that the Change, Backout, and Test Plan fields have not been completed. I can create the client script to work on the ONSUBMIT but a submit occurs in Step 1 where I don't want to make the Change, Backout, Test plan mandatory.
Thanks again for your assistance.
Domenic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2014 11:16 AM
Utilize a UI policy to make those fields mandatory.
http://wiki.servicenow.com/index.php?title=Creating_a_UI_Policy
I would set them mandatory based on the workflow stage or approval state that way they are not mandatory upon creation.
Kyle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2014 02:10 PM
I am utilizing a workflow condition to require the Change, Backout and Test Plan be required to be completed before moving on to the next step of the workflow. This condition is working just fine. The issue is that when a user updates the change form and does not fill out Change, Backout and Test Plan it will still accept the update but will not notify the user that the fields are required so it sits in a wait state of Not Yet Approved (Approval is the next step). And I don't know where I need to put a script to make a popup appear. In the work condition?
Thanks,
Domenic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2014 05:19 AM
http://wiki.servicenow.com/index.php?title=Creating_a_UI_Policy
Please utilize this link. Create the UI policy by right-clicking on the header of your change > select personalize > then select UI Policy > then click 'new'.
Kyle