CSVBuddy icon indicating copy to clipboard operation
CSVBuddy copied to clipboard

Reuse column(s) to create a new column

Open JnLlnd opened this issue 4 years ago • 2 comments

Reuse fields allowing, when loading a file or using the Select command, to create a new field based on the content of previous fields in each row

Configurable reuse opening and closing delimiters in the "Options" tab (by default "[]"). Choose characters that won't be used in other fields name.

Reuse specifications used in a CSV import file header or in the "Select fields" text box in two parts: 1) fields to reuse and format, 2) new field name, "[[fields and format][name]]"

  • [fields and format]: : format the new field reusing existing fields by enclosing their name between delimiters, example [Client: [LastName], [FirstName]]

  • [name]: name of the new field

  • for example: inserting reuse specs in the header "LastName,FirstName,City,[[Client: [FirstName] [LastName] ([City])][Name and city]]" would add to your data a new field named "Name and city" with content: "Lalonde,Jean,Montreal,Client: Jean Lalonde (Montreal)" "Presley,Elvis,Memphis,Client: Elvis Presley (Memphis)"

Requirements:

  • reused fields must appear in the fields list before they can be reused;
  • if the reuse specs include field delimiters, this whole field must be enclosed with field encapsulators.

JnLlnd avatar Feb 08 '22 15:02 JnLlnd

Thanks for the update Jean!

JoeGlines avatar Feb 08 '22 16:02 JoeGlines

I decided to simplify the reuse specifications used in a CSV import file header or in the "Select fields" text box. There were no benefits to have the fields list in a separate section ("[[field(s)][format][name]]"). I changed the specs to merge the fields name and the format. See the new description above.

JnLlnd avatar Feb 25 '22 22:02 JnLlnd