Using the same tag twice shows the TAG

Hi!

I am trying to do some documents and I need to hide a lot of texts based on some tags. In my case I am not allowed to send the text into a tag for reasons.
I found out that using the TRUE/FALSE values they will not show on the final document, so I am mostly using it, but I am getting wrong results when I use the same tag in more than one place.

Template:


test_template.docx (13.2 KB)

JSON:


test_json.txt (86 Bytes)

Result:


Test_result.docx (18.8 KB)

What am I doing wrong?

Hi @thais,

I thin k you can try to use hide-block-if-empty , i.e. {{tag1}:hide-block-if-empty}

In that case a tag will be displayed only id there is a value: true, 1 or any other value.

Use different tags for different sections. So, tag1 and tag 2 for the first section, tag3 and tag 4 for the second, etc. This way you'll ensure that a correct tag is displayed/hidden.

Best Regards,
Petr Bushuev
Plumsail Еeam

Hi @Petr

Thank you! I tried with the empty tag and the logic works, but it shows the value when it is not empty, so it do not solve my problem, because I need a tag that will show no value on the final document.


image

I will try think about some value that I can send on my tags and it will work on all my texts. I was thinking about the period, but I have 12 tags in each cell (and over 1000 cells), so I am not sure how to do it, but I will keep thinking.
Thank you!!!!

Hello,

Our developers just released an update that should improve the logic.

So, using the same tag twice and more is supported now, including arrays.

Best regards,
Petr
Plumsail team

Hello,

To use hide-block-if-empty formatter please use the syntax:

{{tag1}:hide-block-if-empty(hide)}

Best regards,
Petr
Plumsail team

Hi,

I tried this using the same tag more than 2 times, and it seems to not work. Can you please confirm?

Best,
Anita

Hi @Anita_Tran,

It's not supported yat. I asked the developers to check if we can add this feature.
I'll reply a bit later once I have some details.

Best regards,
Petr
Plumsail team

1 Like