Categories > OpenTBS with DOCX >

How to conditional if else in docx ?

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Oppo
Date: 2014-07-11
Time: 08:18

How to conditional if else in docx ?

How to show and hide the label [Merk - Track - Type - Location - Certificate], so here goes :
when I have a vehicle data, the data appears :
[xtable;block=tbs:page]
Merk        : [xtable.VehicleMerk;noerr]
Track        : [xtable.VehicleTrack;noerr]
Type        : [xtable.VehicleType;noerr]
and land data the data does not appear, and otherwise.

my full code :
[xtable;block=tbs:page]
Merk        : [xtable.VehicleMerk;noerr]
Track        : [xtable.VehicleTrack;noerr]
Type        : [xtable.VehicleType;noerr]
--------------------------------------------------
Location    : [xtable.LandLocation;noerr]
Certificate    : [xtable.LandCertificate;noerr]

thanks before.
By: Skrol29
Date: 2014-07-11
Time: 10:48

Re: How to conditional if else in docx ?

Hi Oppo,

The simplest is this :
Put your vehicle information in a unique paragraph, and your land information in another unique paragraph..
Then use parameter magnet in order to make a conditional display on the paragraph.

--------------------------------------------------
Merk        : [xtable.VehicleMerk;noerr;magnet=tbs:p]
Track       : [xtable.VehicleTrack;noerr]
Type        : [xtable.VehicleType;noerr]
--------------------------------------------------
Location    : [xtable.LandLocation;noerr;magnet=tbs:p]
Certificate : [xtable.LandCertificate;noerr]
--------------------------------------------------
By: Oppo
Date: 2014-07-14
Time: 05:00

Re: How to conditional if else in docx ?

Ok, solved, thanks :)