30-01-2015 05:03 PM
Hi.
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.” ”
Some Ideas?
Thanks.
Solved! Go to Solution.
06-02-2015 02:49 PM
Working solution:
It’s not the best but it work
Thanks everybody for help and suggestions.
05-02-2015 10:29 AM - edited 05-02-2015 03:27 PM
Marco,
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...)
Regards,
Lionel
05-02-2015 09:48 AM
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.
http://community.mega.com/t5/custom/page/page-id/mega-kb-solution?sid=50120000000mr0sAAA
05-02-2015 08:27 AM
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.
04-02-2015 04:48 PM
Thanks everybody for ideas, but my case is more complex (as in this picture).
Possibile solutions under investigation:
03-02-2015 08:01 AM
If you are a code savy you could always use a simple macro.
02-02-2015 11:11 AM
Hello Marco,
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 🙂
30-01-2015 05:13 PM - edited 30-01-2015 05:14 PM
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
Ex:
This is much easier to document