Skip to content
This repository has been archived by the owner on Feb 21, 2020. It is now read-only.
Felix Lohmeier edited this page Oct 28, 2017 · 8 revisions

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.

install

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

usage

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("|")

Clone this wiki locally