Update Cross function to accept non-string wrapped cells

This commit is contained in:
Owen Stephens 2018-11-22 17:54:29 +00:00
parent 72be6e14a4
commit d1acd9336c

View File

@ -67,10 +67,11 @@ public class Cross implements Function {
(String) toProjectName,
(String) toColumnName
);
String srcValue = v instanceof String ? (String)v : (String)((WrappedCell) v).cell.value;
return join.getRows(srcValue);
if(v instanceof String) {
return join.getRows(v);
} else {
return join.getRows(((WrappedCell) v).cell.value);
}
}
}
return new EvalError(ControlFunctionRegistry.getFunctionName(this) + " expects a string or cell, a project name to join with, and a column name in that project");