Hi,
Could someone clarify my doubt about difference between the usage of the rules APN_isEmpty and APN_isBlank?
It would be good if a simple example is illustrated to make it simple to understand.
Thanks
Faisal
Discussion posts and replies are publicly visible
Note that these are now largely unnecessary thanks to the new rules a!isNullOrEmpty() and a!isNotNullOrEmpty().
As far as the two you've named - isBlank() is meant to determine whether a singular value is blank or null, while isEmpty() is meant to determine whether an array is completely empty. For instance, an array with a single null is not considered empty, but would (iirc) show up as "blank".
In the past though it was important to use these helper rules because there were some odd corner cases in the primitive rules that would break. I don't remember many exact examples off the top of my head. There was no direct way to do isEmpty() but by doing i.e. "length(ri!value) = 0", which itself fails when the value is null (instead of an empty set), so the helper rule handled null-checking. The new functions I named at the top of this reply handle all that stuff pretty gracefully as far as I can tell.
Fully agree with Mike. The singular values cause less problems but I've certainly had them cause issues in the past. The need for isEmpty() is much more demonstrable, see below:
Using isnull() on a list of nulls returns false which is generally not the desired outcome.
But also as Mike points out, the new a!isNullOrEmpty() and a!isNotNullOrEmpty() is the way to go if you're on version 21.4.
isEmpty check whether a value is null or an empty list. isBlank checks for null and an empty string.
I do not use these expressions and recommend to use the new a!isNullOrEmpty function
docs.appian.com/.../fnc_informational_isnullorempty.html
I has to say, i was pretty happy about the introduction of a!isNullOrEmpty() and a!isNotNullOrEmpty(),Appian recognized the gap there and took care.
I agree - and also, it was pretty satisfying just replacing the logic in my existing helper expresion rules, meaning i didn't have hundreds of random instances of sloppy code to hunt down and change.
Hi All,
Really very helpful suggestions and solutions .
One thing I did not understand. What is "singlePV"
rule!APN_isBlank(singlePV)
Returns boolean regarding a singlePV if it's either null or has no characters.
singlePV (Any Type)
Could someone clarify please?
Faisal H Faridi said:What is "singlePV"
I don't see this exact term used anywhere prior in this thread, or even at Stefan's link - can you clarify what you're referring to? Without any other context I'd guess it's referring to a PV of "single" type, i.e. not an array (aka "multiple"), but that's just a blind guess at this point.
Hi Stefan,Agree that they're not necessary anymore. Please hear my current scenario and give me a hint: i have to import 2 applications in a fresh cloud environment, and I miss the APN_isBlank() and APN_isEmpty() precedent rules (they weren't included in the packages with applciation objects). Can you please let me know where I might find them? are they in market place? I'm not able to find them anymore like in the old days on Appian Forum.I've a support ticket open about that but no answer so far.Thanks!
Search old posts - I (among others) may have posted small app packages here or there containing just these or a similarly small set of the old common objects rules.
I was able to create a consolidated fresh 21.4 export of both the original legacy APN_isBlank and APN_isEmpty rules (But only these two), along with all necessary precedent folders. PFA.
Legacy APN Common Objects - isBlank and isEmpty (consolidated 21.4 export).zip