[DONE] Field to store data will alter its content

We have an automation, that pulls data from a source. It should store it as is. We currently use a multi line field for it. Unfortunately it seems to alter the content. There seems to be no other field type, where we can save data without tape filtering / chaging it? That prevents many useful usecases.

Something like a β€œraw” field seems to be needed.

We found out by comparing the content of the field with the console output in the log - which is complete - but as soon as its stored in a field, data gets lost. Creating a PDF right away from the automation result (before saving into the field) also has all the unchanged data (but interpreted - which could also mean trouble. how could we save data into a PDF uninterpreted?) :wink:

Background: Its JSON, which contains HTML.

3 Likes

Hi Dirk,

thank you very much for the report.
We understood both issues and will provide a fix.
In the PDF action it is a standard use case that submitted HTML should be interpreted. But we need a solution to plot the string unchanged.
In the multi line text field it was a requirement that Markdown submitted via the API is interpreted. That is most certainly the cause here. Need to make the interpreting very sure configurable.
We will get back to you when the fixes are life.

Cheers!
Leo

3 Likes

Hi @dirk_s,

as we already discussed on another channel, this can be easily solved using a simple calculation beforehand. I will share our solution here for other to reuse in the future.

We use lodash to escape your value (lodash is one of the exposed libraries in Tape automations and calculation fields, see here). This will escape all HTML characters and prevent Tape from interpreting the HTML for the rich text editor.

The calculation will look as follows (of course you should use your variable that you attempt to store):

lodash.escape(your_variable_name)

You can then use your calculation result variable and set your multi text field value to that calculation result after. In that case, the respective updated / created record will properly display even complex JSONs with nested HTML without issues.

Please let us know if that worked and hit me up if you have further questions.

Cheers
Tim

1 Like

Thats the related feature request, which would solve the root cause:

1 Like