Skip to content

Piping and Transformation

tjamesmac edited this page Mar 31, 2020 · 1 revision

Piping and Transformation

What is it?

Piping

Involves taking an answer from a previous question or a set value from embedded metadata and 'piping' into a new question.

Transformation

Involves transforming the type of answer or metadata and converting it into one suitable for piping.

What's new?

Piping and transformation have been updated in all the relevant v3 products.

Instead of embedding a transformation within a string like so: {{ format_unit(answers['answer5d256a64-156e-44e2-b41c-dd9694111456'], 'length-centimeter') }}

It now follows a format similar to the one outlined here.

At the time of writing, we only support Date, Date Range, Number, Currency and Text formats for transformation however we are looking at implementing other formats.

Where is it?

The majority of Piping and Transformation logic is based in ConvertPipes/index.js.

If adding additional transformation types in the future, this will be the place to do so.

Clone this wiki locally