Source:
<code>public Object call(Properties bindings, Object[] args) { if (args.length == 1 || args.length == 2 || args.length == 3) { Object v = args[0]; Object targetProjectName = args.length < 2 || args[1].equals("") ? <START> ((Project) bindings.get("project")).getMetadata().getName() : args[1]; <END> Object targetColumnName = args.length < 3 || args[2].equals("") ? INDEX_COLUMN_NAME: args[2]; long targetProjectID; ProjectLookup lookup; if (v != null && targetProjectName instanceof String && targetColumnName instanceof String) { try { targetProjectID = ProjectManager.singleton.getProjectID((String) targetProjectName); } catch (GetProjectIDException e) { return new EvalError(e.getMessage()); } try { lookup = ProjectManager.singleton.getLookupCacheManager().getLookup(targetProjectID, (String) targetColumnName); } catch (LookupException e) { return new EvalError(e.getMessage()); } if (v instanceof WrappedCell) { return lookup.getRows(((WrappedCell) v).cell.value); } else if (v instanceof Number && targetColumnName.equals(INDEX_COLUMN_NAME)){ return lookup.getRows(((Number) v).intValue()); } else { return lookup.getRows(v); } } } return new EvalError(ControlFunctionRegistry.getFunctionName(this) + " expects a cell or cell value, a project name to look up (optional), and a column name in that project (optional)"); }</code><technical_language>Project's name. I 25 projects unique Project IDs a common name "clipboard". fine, allow that. cross() however, a Project name supplied get confused shown, need improve this handling (in other words, I perform a cross() current binding a Project id. @thadguidry: I keen overloading function parameters, but, in this case, I accept number (project IDs) in addition of strings (project names) identify a project in cross(1, 2069987961613) function. Because, 2 ways of identifying exact thing. logic is sometimes, a string is precise enough identify a project, whereas, Project ID be. do that? Regards, A</technical_language>

Target:
public Object call(Properties bindings, Object[] args) { if (1 <= args.length && args.length <= 3) { Object v = args[0]; Object targetProjectName = ""; boolean isCurrentProject = false; if (args.length < 2 || args[1].equals("")) { isCurrentProject = true; } else { targetProjectName = args[1]; } Object targetColumnName = args.length < 3 || args[2].equals("") ? INDEX_COLUMN_NAME: args[2]; long targetProjectID; ProjectLookup lookup; if (v != null && targetProjectName instanceof String && targetColumnName instanceof String) { try { targetProjectID = isCurrentProject ? ((Project) bindings.get("project")).id : ProjectManager.singleton.getProjectID((String) targetProjectName); } catch (GetProjectIDException e) { return new EvalError(e.getMessage()); } try { lookup = ProjectManager.singleton.getLookupCacheManager().getLookup(targetProjectID, (String) targetColumnName); } catch (LookupException e) { return new EvalError(e.getMessage()); } if (v instanceof WrappedCell) { return lookup.getRows(((WrappedCell) v).cell.value); } else { return lookup.getRows(v); } } } return new EvalError(ControlFunctionRegistry.getFunctionName(this) + " expects a cell or value, a project name to look up (optional), and a column name in that project (optional)"); }