In RFT descriptor I like to change the output of a Boolean attribute in
"X" if the value is 1
" " if the value is 0
Instead of 1 an 0 I like to see “X” and blank.” ”
Solved! Go to Solution.
I am not aware of such feature.
I general, a good practice is to implement boolean properties as MetaAttribute of type 'String' and format 'Enumeration'
You can create 2 MetaAttribute values
This is much easier to document
As Jérôme said, it is easier to use string attributes.
But if you do not want to create a new MetaAttribute, and really need your X in place of 1, you can do it, but it's a quite heavy solution.
Let me explain with the "Detailed Sepcification" boolean metaAttribute on the "Application" metaclass.
You need to create 2 specific groups under your application group, one in case the boolean attribute is "True" (i.e. checked), one in the other case.
Then, in each group, you will "hard code" the value of your metaAttrite, using "X" in case it's true, and blank otherwise :-)
Thanks everybody for ideas, but my case is more complex (as in this picture).
Possibile solutions under investigation:
If you want this, you need to go for the first possible solution that you suggest, namely implement the table through a VBscript macro. At least that is the one I know that will work and give you the desired result.
Note that RTF macros require MS Word at runtime
As a consequence, they are not supported when report template (MS Word) are converted to RTF format.
This conversion is required to generated report (MS Word) from Web Front-End.
The best solution would be, indeed, to create the whole table via a macro.
But if you do not want to bother with this, another solution would be to use a "trick"
In your descriptor, when you add your field in the table, just add a specific string just before it (like "xxx").
And then, when the document is generated, just search/replace "xxx1" by "X" and "xxx0" by "".
You can also create a very simple word macro to automate this (but this macro still will need to be ran manually...)
It’s not the best but it work
Thanks everybody for help and suggestions.