Hide block completely if value is false

Hi, I have a document with a bullet point list of items. The bullet points are inside of single cells, with some of them being conditionally hidden with hide-block-if(value == null). The boolean value is coming from the form that populates the template. It works for hiding the text, but there's an empty space where the cell would have been. It's not egregious if it's just one being hidden, but multiple in a row leave a bigger empty space.

Because it's not an array, I don't think I can use 'filter'. I think my issue is similar to this post that was not resolved.

I've attached a screenshot of the template and the end result, with the boxes in red being the spaces I would want gone.

Thanks!

Hi @EHaya,

Yes, hide-block-if removes only the element it's related to. In that case, it is the bullet list element. it doesn't affect the element above, i.e. the table cell.

I think there may be several workarounds. This is what I have come up with:

  1. Or place the bullet list in one cell. There will be a space, but not a big one.

  1. Place the values into one element: either a bullet list or a table cell. Probably like that:

There won't be spaces after removing the cells.

image

Or with some values:

image

Best regards,
Petr
Plumsail team

I'll try putting them all in one cell. Thank you!

1 Like

I have a semi-related question. I've adjusted my document to have most of the bullet list items in one cell. However, I have a few tables/text outside of bullet lists that I've put into separate cells (not worried about the spacing issues for these) as they should only be shown in certain conditions.

I have two similar cells - one explaining a benefit the employee will receive if they are NOT a 'parts runner', the other if they ARE. If PartsRunner == false and FullTime == true, the correct cell shows while the other is hidden. If PartsRunner == true and FullTime == true, neither cell shows. Can you help me out on this?


Hi @EHaya,

The formatter doesn't work well when the same token is used in several places. In your case, the same formatter is used with several elements: bullets lists and letters. Could you assign individual tokens for each case, i.e. {{FullTimeYN1}}, {{FullTimeYN2}}, etc. otherwise it won't correctly show the result and may hide all the cells even if the second cell should be shown according to the conditions.

Best regards,
Petr
Plumsail team