Hi Devin,

I think the 'replaceNull' function is what you are looking for. For example:

${ greeting:replaceNull('hello'):length():gt(5) }

You can find the documentation for this function at 
http://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#replacenull
 
<http://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#replacenull>

Thanks
-Mark


> On May 3, 2016, at 6:27 AM, Devin Fisher <[email protected]> 
> wrote:
> 
> I'm looking for the ability similar to the 'getOrDefault'[1] in the Java Map 
> class.  I would like to access an attribute if the flow file has it but be 
> able to define a default if it don't. I've looked over the doc and can't find 
> a way to do it and wanted to see if someone else has done it.
> 
> Devin 
> 
> [1] 
> https://docs.oracle.com/javase/8/docs/api/java/util/Map.html#getOrDefault-java.lang.Object-V-
>  
> <https://docs.oracle.com/javase/8/docs/api/java/util/Map.html#getOrDefault-java.lang.Object-V->

Reply via email to