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) toProjectName,
(String) toColumnName (String) toColumnName
); );
if(v instanceof String) {
String srcValue = v instanceof String ? (String)v : (String)((WrappedCell) v).cell.value; return join.getRows(v);
} else {
return join.getRows(srcValue); 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"); return new EvalError(ControlFunctionRegistry.getFunctionName(this) + " expects a string or cell, a project name to join with, and a column name in that project");