How to conditionally hide some table rows

Hi, I tried to create an expression for the IF tagging element to display only the rows where a certain condition is met. This is the result without using the IF element:

The fields in the third column display the value of the @IsOpenTransaction boolean data field from the data source. I would expect the IF expression I created to show the three rows highlighted in green and hide the rest of the rows, but as you can see in the LivePreview, the entire table disappears:

I double-checked the binding and it appears to be correct. The strange thing is that the invert checkbox does not work either.

So even with the inverted expression, none of the rows are visible. To see them, I had to remove the IF element. How is that supposed to work?

Here is the template:
CustAccountStatementExt.Report_the if element does not work as expected.docx (94.7 KB)

Hello Karin,

Thank you for your question.

Without the if tagging expression per se, all of the rows will be listed regardless as you already know.

If we position the if tagging element above the list itself, we will then either show or hide the entire list based on that condition.
Unless we want to show/hide the entire list we do not use such an option.

Normally, we use the if tagging element below the list. As a result, we will achieve the results you were hoping for in your initial question.
As expected we are now only displaying the rows which are conditionally matched (true).

However, we can avoid the use of if tagging element and use the filtering condition directly on the list itself.

In this case, we have used the string function to convert the field @IsOpenTransaction to string which we compared with ‘true’. All the lines that match the condition will be displayed.

As you can see above, we have used 2 different approaches which lead us to the same result.

Attached please find booth versions of templates.

CustAccountStatementExt.Report_the if element does not work as expected option 1.docx (95.6 KB)
CustAccountStatementExt.Report_the if element does not work as expected option 2.docx (95.0 KB)

Hello Jan, thanks for your explanation and the template examples provided: very useful!