How to keep only non null values in an array?

Hi

Is there a way to modify the following expression so that i only keep non null values in the array

myArray = Split(in_TransactionItem.SpecificContent(“Documents”).toString,“;”).Concat(Split(in_Config(“Documents”).ToString(),“;”)).ToArray

Thank you!

Hi @adext

Try this:

myArray = Split(in_TransactionItem.SpecificContent("Documents").ToString(), ";").Concat(Split(in_Config("Documents").ToString(), ";")).Where(Function(s) Not String.IsNullOrEmpty(s)).ToArray()

Hope it helps!!

Hi @adext

Can you try the below expression

myArray = Split(in_TransactionItem.SpecificContent("Documents").ToString, ";").Concat(Split(in_Config("Documents").ToString(), ";")).Where(Function(item) Not String.IsNullOrEmpty(item)).ToArray()

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.