Loction Field Selection
Hi,
I have customised the Helpdesk Solution and everything is running smoothly.
I have added a Location field in the Helpdesk page. Now I need is that users should select the location from the drop-down list. How can i create a policy where it validates the field and then save the ticket.
My validation rule is :
Name: Require Location Selection
Comment:
Display this message: Please choose a Location under: WORKITEM(workitem_region_lookup)
Log to Notification Server: If no user interface present
When: Only when incident is new
And: When ALL of these are TRUE
"HDQUERY[[select (*) from workitem_region_lookup where id='']]" is equal to "100"
"workitem_region_lookup_id" is equal to "100"
"Modified by name" is the same as "Guest"
<end>
Status: Active
Please assist.
Regards,
Rahiz
Comments
To ensure that the location
To ensure that the location is chosen all you would need is:
When All Of These Are True
"HDQUERY[[ SELECT CASE WHEN 'WORKITEM(region_lookup_id)' IN (select id from workitem_region_lookup) THEN 1 ELSE 0 END]]" is not equal to "1"
Location Field
Hi Mccarthy,
Thanks, But still i am unsuccessful from my side.
I am trying to add the query in the valiation rule using advanced condition
But still it is not getting validated. attached is the locations what i have and the values are
100 = None
200 = Bangalore - JT
300 = Bangalore - SC.. etc
I am also attaching the validtion snapshot. I just need that where i am going wrong because when i use the advanced condition in the validation rule, its asking me "when" and "compared as" field. because i am not getting the option " When all these are TRUE"
Can you help me where can i key in the query directly.
Thanks you and need us assistance
Regards,
Rahiz
Two Options
Looks like the rule is working, but we didn't account for "None" to have a location lookup id. You can either try this query:
"HDQUERY[[ SELECT CASE WHEN 'WORKITEM(region_lookup_id)' IN (select id from workitem_region_lookup where id <> 100) THEN 1 ELSE 0 END]]" is not equal to "1"
or remove/deactivate "None" as a location.
Hope this helps,
Brad
Rule not firing
Hi Brad,
Thanks for your update. But still the validation rule is not working.
I need that users should mandatory select the location from the drop down list and the incident should not save unless changed from NONE i.e. 100 to any other different location.
How can i know that this rule has been fired when user creates a new incident.
Please assist.
Rahiz
If the rule is fired the user
If the rule is fired the user will see a notice at the top of the screen. The notice will be whatever you have typed in the comment box.
No Comment
Hi Mccarthy,
Thanks, but I tried it and i cannot see any notification other than "Title is required" and Please enter a comment"
Im sure your and brad help was cool, but i am not able to resolve this issue.
What else needs to be changed in the notification query to get the Location Manually selected.
Regards,
Rahiz
Can you export the rule?
Rahiz,
Can you export the validation rule and upload it? From what I can see, it should be working. I'd like to import it into my test environment to verify I haven't missed anything.
Thanks,
Brad
Yeah. This is a good idea.
Yeah. This is a good idea.
Validation Rule Attachment
Hi Brad & Mccarthy,
Sorry for the late response as i was on leave.
Please find enclosed xml and jpg file for reference.
Thanks for all ur assistance.
=====================================================
<Helpdesk>
<ValidationRules>
<ValidationRule>
<Guid>86d112f5-d178-4b13-8053-5b3863a85355</Guid>
<Name>Copy of Blank Location not allowed for guests</Name>
<Description>Requires guest workers enter a non-blank Location.</Description>
<Status>active</Status>
<Message>Please Select the Location.</Message>
<LogToNs>yes</LogToNs>
<Rank>6</Rank>
<ApplyTo>all</ApplyTo>
<Criteria>
<Criterion field=""HDQUERY[[ SELECT CASE WHEN 'WORKITEM(region_lookup_id)' IN (select id from workitem_region_lookup where id <> 100) THEN 1 ELSE 0 END]]
" op="optNotEqual" value="1" type="uint" />
</Criteria>
</ValidationRule>
</ValidationRules>
</Helpdesk>
===========================================
My Fault
I think this one is my fault. You need to remove the quotes around the HDQUERY. Try that and let me know.
-Brad
Error
Hi Brad,
Thanks, but i feel very bad to bother you again and again.
I tried removing the double quotes (") before HDQuery and at the END ("), but when i save it the quotes comes automatically.
HDQUERY[[ SELECT CASE WHEN 'WORKITEM(region_lookup_id)' IN (select id from workitem_region_lookup where id <> 100) THEN 1 ELSE 0 END]]
Is this query correct. Also, when i try to import the query and remove " from HDQuery it throws error in red. Please assist.
I have done customization from the article "Customize my Helpdesk Console"
<Helpdesk>
<ValidationRules>
<ValidationRule>
<Guid>7548fa4d-9721-4891-86b3-8c00543c2c11</Guid>
<Name>Blank Location not allowed for users</Name>
<Description>This rule validates that the Location Field on the Helpdesk page is selected.</Description>
<Status>active</Status>
<Message>Please select a Location from the Location Field Drop-Down Box.</Message>
<LogToNs>yes</LogToNs>
<Rank>0</Rank>
<ApplyTo>all</ApplyTo>
<Criteria>
<Criterion field="HDQUERY[[ SELECT CASE WHEN 'WORKITEM(region_lookup_id)' IN (select id from workitem_region_lookup where id <> 100) THEN 1 ELSE 0 END]]" op="optNotEqual" value="1" type="uint" />
</Criteria>
</ValidationRule>
</ValidationRules>
</Helpdesk>
Help
Hi,
Any one can help me please...
Regards,
Rahiz
Would you like to reply?
Login or Register to post your comment.