-
Notifications
You must be signed in to change notification settings - Fork 1
Home
This fork includes pull request #1294 from @claussni to extend cross (). The cross function now accepts a 4th parameter defining a regular expression separator for splitting multi-value field values when joining projects.
clone this git repository
git clone https://github.com/felixlohmeier/OpenRefine.git
on Windows, type:
refine build
refine
on MacOSX or **nix, type:
./refine build
./refine
see also: https://github.com/OpenRefine/OpenRefine/wiki/Get-Development-Version
Example for splitting multi-value field values in from column and extract more than one value from the results:
forEach(value.cross("My Address Book", "friend", ","),r,forNonBlank(r.cells["address"].value,v,v,"")).join("|")
Example for splitting multi-value field values in from column, extract only the first value from the results and return a custom string if there is a match in foreign key ("friend") but no value in target column ("address"):
forEach(value.split(","),v,forNonBlank(v.cross("My Address Book", "friend", ",")[0].cells["address"].value,x,x,"!")).join("|")