Highlighted
Super Contributor.. Super Contributor..
Super Contributor..
551 views

Validation on RESOLVE button

Hello.

 

Could you advice please.

We have a validation on save button.

It's not possible to save incident (pop up appear) when you pres SAVE and if condition in format controll are:

Severity=5 and checkbox Flag is True.

But it's possible to save the incident when pressing RESOLVE.

We tried to put the same validation on DEL column in FormatControl but it does not work.

When pressing RESOLVE the format IM.update is changed to IM.close and it's possible to save the incident.

Please advice how to add the same validation but on button RESOLVE that it will not be possible to save incident and the popup will appear.

Thanks

Dom.

 

 

0 Likes
9 Replies
Highlighted
Outstanding Contributor.. Outstanding Contributor..
Outstanding Contributor..

Re: Validation on RESOLVE button

Typically I always prefer to keep "validation-like" functionality within formatctrl, so that it's housed all in one place, but if you can't get this to work as a formatctrl validation, you can find that Resolve displayoption, put something like this in the Post Rad Expressions, and it should do what you want: if (severity in $L.file="5" and flag=true) then ($L.ds.action="do nothing")

0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: Validation on RESOLVE button

Strange Behaviour Wdomerac,

FC is also called when you resolve an incident. The delete conditions runs on Close only on "phased modules", like Change and Request.

What is the condition of your validation?

To make sure that FC is being called, put a print("FC xxxx") on your javascript with true on all conditions. If the message appears something is wrong with your validation. If not, try to put the validation on the master FC. 

I don't believe it's necessary, since the FC solution should work.... but..... An Ugly solution would be put these behavior in the button (alter the action based on your condition and show the message) or in the process (show the message and skip the execution of the update).

Let me know which you choose. 

Regards,

Breno Abreu

Regards,
Breno Abreu

If you feel this was helpful please click the KUDOS! thumb below!
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Validation on RESOLVE button

Hi,

What version of SM are you using?  Can I assume, based on you putting stuff in the formatctrl, that you are not in a process designer environment that uses RuleSets?

Audrey

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Validation on RESOLVE button

If you access the probsummary Object, then the im.view State (I think that's it, the one for viewing an active record to update), and find the action that is called by the Resolve display option, is "Save First" set to true? If not, set it to true and see if that forces a validation when the button is clicked but prior to display of the im.incident.close form.

Not a  system right now, so just guessing.

----------------------------------------------------
Kudos - what, where, how, and why
Want Good Answers? Ask Good Questions...
0 Likes
Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

Re: Validation on RESOLVE button

Unfortunatelly this does not work 😞

our version is still yet 9.30.

0 Likes
Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

Re: Validation on RESOLVE button

I've put "print" in to FC - javascript tab

 

TRUE in save and delete.

 

But print message works only while click save button. When press" Resolved" nothing is printed.

So I assume that "Resolve" button is some different action or state....

0 Likes
Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

Re: Validation on RESOLVE button

I put this as you advise:

 

if (severity in $L.file="5" and CUST.major.flag=true) then ($L.ds.action="do nothing")

 

but:

 

Process panel get.action in RAD display encountered error in line 7 (display,get.action)
Cannot evaluate expression (display,get.action)
Cannot evaluate expression (display,get.action)
Cannot evaluate expression (display,get.action)
Bad arg(2) oper = (display,get.action)
Cannot evaluate expression (display,get.action)
Cannot evaluate expression (display,get.action)
Cannot evaluate expression (display,get.action)
Cannot evaluate (CUST.major.flag=true) (display,get.action)
Bad arg(2) oper and (display,get.action)
Cannot evaluate expression (display,get.action)
Bad arg(1) oper = (display,get.action)
Cannot evaluate expression (display,get.action)
Bad arg(2) oper in (display,get.action)
Cannot evaluate expression (display,get.action)

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Validation on RESOLVE button

Save button use different process and resolve button might have configured to use different process.

If you can make change to the process it will work.

0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: Validation on RESOLVE button

Hello Wdomerac, 

I took a look at the 9.30 environment and it reminds me that the OOB close is composed of two steps. First one with no validation, that just change the status of the incident (don't call any FC) and the other one which really close the incident. 

If you want to put the message in the first step you can put the condition in DO or change the process im.set.close, calling the FC for example..

Change your code to the condition bellow and it will probably work.  Put the condition in the Post Rad Expression, after the first line. You can also merge the code with the OOB.

if (severity in $L.file="5" and CUST.major.flag in $L.file=true) then ($L.ds.action="do nothing")

 

Regards,

Breno Abreu

Regards,
Breno Abreu

If you feel this was helpful please click the KUDOS! thumb below!
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.