Hide Panel If String Starts With Zero


Badge +9

I am trying to hide a panel if a string control's value starts with zero or if null or empty. Basically, the string value is last four social security number that may have one zero two zero or three zeros. I have about 10 other panels that hide if the string control's value starts with 1 through 9, but this specific panel does not seem to hide.

Below is the rule that i am using for zero:

(isNullOrEmpty(Last4SSN) || not(startsWith(Last4SSN, "0")))

I have also tried single quotes instead of double quotes but it does not seem to work.

Below is the rule that i am using for 1 through 9:

Nintex Forms Designer - New Hazard Card - Item

(isNullOrEmpty(Last4SSN) || not(startsWith(Last4SSN, "1")))

It seems like this is a bug since startsWith() cannot recognize string with zeros??


2 replies

Badge +9

I figured this out, instead of using startsWith runtime function use greater than (>) less than (<)

isNullOrEmpty(Last4SSN) || Last4SSN >= 3000 || Last4SSN <2000

Because startsWith and other functions treats strings with leading zeros as numbers

Badge +9

Aww, apple devices does not like above runtime function, therefore used below:

isNullOrEmpty(Last4SSN) || greaterThanOrEqual(Last4SSN, "3000") || lessThan(Last4SSN, "2000")

Reply