Hiding product information in lists within a document

I am trying to create a dynamic document that has sections with many lists based upon a product that a customer may or may not be using. The master document has all information present and I am trying to create a specific one from the master (by excluding or hiding what is not relative). So my JSON data would simply list which products are valid for this customer and then I want to use that to hide or exclude. A small sample is:

1.1 SECTION INCLUDES
A. [Adjustable] [Built-in] [Fixed wood] [Fixed Ventilated Wire] Closet organizer systems.
1. freedomRail – Fully adjustable closet organizer systems with wire or wood shelving
2. Select – Closet organizer system with built-in wood shelving for premium applications
3. Vue – Closet organizer system with wood shelving
4. Lifetime - Ventilated wire closet organizer systems for standard applications.
5. Shelftech - Ventilated wire closet organizer systems for economy applications.

And my JSON has:

{
"designSpecName": "Aspen - Retirement - Bronze",
"show": {
"freedomRail": "",
"select": "",
"vue": "T",
"lifetime": "T",
"shelftech": ""
}
}

I tried hide-block-if(value.vue == "") carrying this theme on each line but it seems to not show anything if the first item is not true (It hides everything)

Hello @bobryan,

Hide-block-if doesn't work well when used with the same value in different places inside one document.

if you use an array the, to hide items from an array, we recommend to use the filter operation instead of the hide formatter. The hide formatter should be used only for hiding arbitrary blocks.

Also please check this article

If the options don't work for you, please share the docx sample and the full JSON. I'll check if the hide-block formatter is applied correctly.

Best regards,
Petr
Plumsail team

3PartSpecSource.docx (48.7 KB)
Attached is the master document. I have only tried to automate the first small section and will need to do similar things throughout but wanted to get the pattern correct before I went all in. The JSON to this point is very simple:

{
"designSpecName": "Aspen - Retirement - Bronze",
"show": {
"freedomRail": "",
"select": "",
"vue": "T",
"lifetime": "",
"shelftech": ""
}
}

Hello @bobryan,

In you docx template the hide-block if formatter is applied for the same tag in different places and as i wrote it doesn't work well in that case.

It works ok when applied to one tag in one arbitrary block.

For example, this way (I wrapped each tag in rich text)

The JSON:

{
"show": {
"freedomRail": "",
"select": "T"
}
}

and the result:

However, If add the same tag twice:

The result is incorrect:

Try to use the formatter with one tag in one place and avoid using it twice and more with the same tag.

Best regards,
Petr
Plumsail team