cancel
Showing results for 
Search instead for 
Did you mean: 

Sample PCO2.1 for MI 12.1

Former Member
0 Kudos

I am trying to configure the expression editor so I can accurately retrieve a notification from PCO when an event is triggered. I am simply polling one tag called LOCK and I wish to see if the value of LOCK is either LOCK or UNLOCK. This is a string datatype so I figured the expression should be...StringIf(LOCK == "LOCK",1,0). When I test it, I can pass the value to my BLS, but it is not passing a 1 or a 0, t is passing what I put in the value spot. Does anyone have a sample expression that I could review so I can get a better idea to how this is supposed to be set up? Any documentation would be nice too.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

use if instead of stringif

Answers (2)

Answers (2)

Former Member
0 Kudos

Andreev is correct. The 2nd and 3rd param needs to be strings. PCo 2.1 help on [stringif|http://help.sap.com/saphelp_pco21/helpdata/en/42/3550f08e2e444ea4d24a5e12bbfe54/content.htm]() is here.

Regards,

Kevin

Former Member
0 Kudos

2nd and 3rd parameter of stringif() function must be strings: StringIf(LOCK == "LOCK","1","0").

== operator returns boolean value, so you can write just (LOCK == "LOCK")