Categories > OpenTBS with DOCX >

Remove blocks with nodata

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Chris
Date: 2015-03-06
Time: 16:29

Remove blocks with nodata

Hi,
I have read through the forum and have found similar situations with what I am trying to do but nothing is working. I have a docx file with four columns grouped by teams and members. It gets filled down. In some instances I have no members, but do have a team. If there are no members in the team I want it to not display the box. Here is what I am doing. Magnet and bmagnet do not seem to work.
word four column table...Each block fills with team name and members below. How do I remove those with no data in the output??
First block
[main.Team;block=tbs:row]
[sub.MemberName; block= w:p;p1=[main.Team]; p2=1][sub.val]
Second block and so on. Only difference is the p2 variable in the query
[main.Team;block=tbs:row]
[sub.MemberName; block= w:p;p1=[main.Team]; p2=2][sub.val]

Output
Team Jen                           Team Pete               Team Virginia           Team Terry
Sarah, Patty, Tom                Eric                        Virginia                   Sam, Victoria

Team Yun                           Team Patrick            Team Erica              Team Bob
Kara, Lucien                        No data                   Trudy, Yuri              Bob

Team Sallie
No data

How do I get Team Sallie and Team Patrick to not show?
Thanks.
By: Skrol29
Date: 2015-03-07
Time: 23:58

Re: Remove blocks with nodata

Hi Chris

It could be possible to delete the team name in the cell, but not the cell itself.
Deleting the cell itself would produce an erroneous table structure.

For deleting the team name when there is no data is the sub-block, then encapsulate the team name and the members in a text box that you place in the cell.
You can change parameters of the text box to have it positioned inside the cell, and have its size adjusted to the contents.

Then simply add parameter "bmagnet=mc:AlternateContent" in the sub-block definition tag (the one having parameter "block=...").
The entity <mc:AlternateContent> is the text box.
So this will delete the text zone when there is no data in the sub-block.
By: Chris
Date: 2015-03-08
Time: 00:30

Re: Remove blocks with nodata

Hi Skrol29,
Thanks for the reply. If I was to have it go via this way as to not make an erroneous table, is this possible with the current method. For example:

Team Jen                           Team Pete               Team Virginia           Team Terry
Sarah, Patty, Tom                Eric                        Virginia                   Sam, Victoria

Team Yun                           Team Patrick            Team Erica              Team Bob
No data                                No data                 No data                  No data

So maybe knowingly I will have a complete tbs:row as null (Team Yun, Patrick, Erica, Bob) it will delete that full row and continue on?

Thanks, Chris