Question3Replies619Views KannanM3 Member since 2019 19 posts Idexx Laboratories Posted: 8 months agoLast activity: 8 months ago Check String for "", null, number, decimal and only StringI have a input string that need to be checked and set the appropriate flag to true or false. Pls let me know how to do it.1. If the input string is "" or null set stringIsEmpty to true- I tried @equals(.value, "") || @equals(.value, null) but it never works2. If the input string is number or decimal set stringIsIntOrDecimal to true- I have a custom function which works if its a whole number or decimal number but fails for "abc1.23"3. If the input string is just "String" with only characters "a" thru "z" set stringIsString to true- I tried @pxContainsViaRegex(.value,"[a-zA-Z]",false) but doesnt work Low-Code App Development Data Integration ×Close popoverFacebookTwitterLinkedinEmail Copy Link Copied! Posted: 8 months agoYathender PEGA replied to KannanM3 Hi 1) compareStrings(.value,"")==0 will be true if string is empty 2) isInteger(.value) || isDouble(.value) will be true if sting is integer or decimal 3) !(pxContainsViaRegex(.value,"[^a-zA-Z]",true)) will be true if string contains characters [a-z] and [A-Z] Posted: 8 months agoKannanM3 Idexx Laboratories replied to YathenderThanks Yethender. If the string is null does the compareStrings return true as well? compareStrings(.value, null)==0Basically the json property can be null or tottally missing, so I need to check these both condition Posted: 8 months agoYathender PEGA replied to KannanM3HiI checked compareStrings(.value, null)==0 and it is not comparing with actual null.You can use PropertyHasValue(.value) for your requirement to check if property has a value.If you have to check property exists or not check using PropertyExists("value") .