Business rules to compare fields and set value

farci
Mega Expert

Hi Team,

I am writing a business rules by selecting filters and action what it has to do, when things match to the condition set. But to no avail

for some reason its not working.

Could you please suggest a script that I can write to get this in place.

Below are the screenshots for your reference.

find_real_file.png

find_real_file.png

to elaborate my requirement further.

If my perfection logic is 1

If my SI Validation Result is greater or equal to expected target. I need to set the Legend field as 'Greater than or Equal to Expected Target'

if my SI Validation Result is in between expected and minimum target (greater or equal to minimum target but lesser than expected target). I need to set the Legend field as 'Between Expected & Minimum Target'

if my SI Validation Result   is less than minimum target. I need to set the Legend field as 'Less than Minimum Target'

and if my SI Validation Result is blank or no value. I need to set the Legend field as 'No Reportable Data'

if my perfection logic is 2

If my SI Validation Result is lesser or equal to expected target. I need to set the Legend field as 'Greater than or Equal to Expected Target'

if my SI Validation Result is in between expected and minimum target (lesser or equal to minimum target but greater than expected target). I need to set the Legend field as 'Between Expected & Minimum Target'

if my SI Validation Result   is greater than minimum target. I need to set the Legend field as 'Less than Minimum Target'

and if my SI Validation Result is blank or no value. I need to set the Legend field as 'No Reportable Data'.

Thank You for your support in advance.

Regards,

Narmi

1 ACCEPTED SOLUTION

It could be that it is returning a string. Try



if(current.s_wf == ' 1')


View solution in original post

7 REPLIES 7

Hi Chuck,



Yes it resolved my issue.



I have come up with a new issue with UI Policy.



I am unable to set a choice field as None when my condition fails. Below


are the screenshots







In execute if False,



I tried all options to set this value as 'None'



but it did not worked.




Thank You for your support and help.



Regards,


Narmi





On Thu, Nov 10, 2016 at 7:41 PM, ctomasi <community-no-reply@servicenow.com>


In the interest of community etiquette, can you mark my earlier response correct and start a new thread about the UI policy? That way people looking for similar answers won't get confused and those who can help with the UI policy will get better visibility to it.



Thanks.


Thank You Chuck,



I will post my question on a new thread.



Regards,


Narmi