Hi Shai,
if I understand your scenario correct you can do that easily with the existing functions. Just use
Array equalS --> Result Constant[X] /
Array is the list that contains your input values (X or empty), Result is your target value that will contain true or false. The function equalS will continue to compare the value of Array with the constant X.
Regards,
Claus
Hi,
<i> return a boolean array with boolean arguments (true/false)</i>
AFAIK, an User Defined Function can return only a STRING. It cannot return a Boolean Variable and also cannot return an Array.
Regards,
Bhavesh
As the guys have said, you won't get an boolean array from an UDF.
The best you could get from an UFD is a string where each char is either 1 or 0, meaning true or false. Your input could also be a string with either X's or whitespaces.
You could do it like:
int i = 0;
String output = "";
while (i < input.length()) {
if (input.charAt(i) == 'X') {
output = output.concat("1");
}
else {
output = output.concat("0");
}
i++;
}
return output;
Shai,
you don't need an "array" of 'X'. You only need one constant with the value 'X'. The text function equalS will continue to compare the values provided by your array with the constant 'X' and create an output array of true/false accordingly.
Regards,
Claus
Add a comment