Conditionally format all row columns to bold based on value from one of the columns (in DOCX table)

Hello! We have a use case whereby the values in a DOCX table row should be shown in bold when one of the fields = "LOT". We must use DOCX templates instead of Excel, because DOCX templates handle in-cell images whereas XLSX does not. I have simplified my use case below.

I have tried many ways to implement this logic, but cannot find a way to get it to work.

Initial template, without bold logic (works fine):
image

Result, without bold logic (works fine):

One of my many failed attempts at getting the bold to work:

Failed result:
image

Desired outcome:

Is there any way to achieve this result?

Hello @soneparcanada,

It is possible to combine the IF formatter with the HTMLformatter in order to achieve the desired result.

Here is the template, json and the result:

JSON:

[{"lighting": "LOT"}, {"lighting": "NOT A LOT"}]

Template:
test-html.docx (12.5 KB)

Result:
bold-if-result.docx (11.2 KB)

There is one note though: Results of templates with the HTML formatter can only be opened with word, at least for the first time, for word to parse the injected HTML.
Alternatively, you can choose PDF as the result type of the process/action and the PDF will be perfectly fine.

Best regards,
Petr
Plumsail team

Hello Petr, thank you for your prompt reply!

The solution provided above works to format a single cell in bold, but my goal is to format all columns in a given row to bold when the pro_type attribute for that item = "LOT".

For example:

Thanks!

Hi @soneparcanada,

Yes, unfortunately, it's only possible to apply to a single value and not to an array.
We'll check further if there is some workaround or if we can improve the product.

Best regards,
Petr
Plumsail team

Hi @soneparcanada,

We will release a new template engine soon, that will support applying bold formatting to some text. It will work for DOCX templates.

We're testing the engine now and I'll notify you once it's released.

Best regards,
Petr
Plumsail team