on 10-15-2012 12:46 PM
Hello
I have to colorize lines with totals and subtotals content within a table. To do so, I want to implement a script into the line element. The colorization without condition can be done easily with the following script in FormCalc:
this.fillColor="240,18,200"
But how can I access the "total level"-indicator? It is available in the context as a component of the table line record. But it is actually not represented by an element on the form.
The context node is (see also attached screen shots):
RESULTS[ ]
DATA
LINES[ ]
DATA
TOTST (total level indicator, type CHAR(1))
(Note: This table-in-table construct is intended and works perfect as required).
I am unexperienced with FormCalc and JavaScript. I tried several things in FormCalc such as
As you can see from the trials above, I have no clue about scripting 😉
May somebody help me with this condition?
Thx in advance!
Cheers
Bodo
Hi Bodo,
Its a bit tricky but you can create a textelement bind it with totst value on the form and make it hidden. From there you will get the value of indicator totst in the form scope.
Hope it helps
Rgds,
Sandeep katoch
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sandeep
thanks, your hint already helps.
I know how to access the value of an element (e.g. if (this.rawValue=="X") then). But how can I access the rawValue of a subnode? Please consider that I have to implement the script on the line element level and the TOTST indicator is a component (= an invisible cell) of the line.
Best Regards
Bodo
Hi Bodo,
Please try this with certain variations i.e by giving path instead of table name
On the TOTST text filed write a java script like
If (this.rawValue == "1") then
xfa.resolveNode("xfa.tablenavigation from form").fillColor = "Specify Color";
Endif
If still not able to solve than send me the xml of form on my email id sandeepkatoch77@gmail.com
I will try to solve
Hope this helps
Rgds,
Sandeep Katoch
Hi Sandeep
your first hint solved my problem. To address the line color control indicator (named TotSt in my example), I had to
if (this.TotSt.rawValue=="9") then
this.fillColor="200,200,200"
endif
Thanks a lot for your help.
Best Regards
Bodo
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.