cancel
Showing results for 
Search instead for 
Did you mean: 

Making table field bold (dynamically)

Former Member
0 Kudos

Hi All

I am new to Adobe forms but cannot find the solution in any other of the discussions.

I have a subform in which I have a table. I would like to set a table field to a bold font dependent on a value in that table row (I am using FormCalc as the scripting) e.g.

Horse     X

Cow    

Sheep     X

So, based on the 2nd column being 'X' decides whether the field is output bold. The result would be:

Horse

Cow

Sheep

Here is what my table looks like:

I am not sure whether my scripting is correct. On field QK_STEXT I have inserted the following script at the 'layout:ready' event:

if ( $DATA.BOLD_LINE_IND[*] == "X" ) then $DATA.QK_STEXT[*].font.weight = "bold" else $DATA.QK_STEXT[*].font.weight = "normal" endif

The problem is the output does not display the text as bold. I have gone so far as to try excluding the 'if' statement above and just try and set the field bold dynamically (even with the following script: !QK_STEXT.font.weight = "bold").

Can anyone please advise as to whether my script syntax is correct and whether I am doing this the correct way.

Regards

Mark

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Okay, so it turns out my syntax is way off.

I should have used the following:

xfa[0].form[0].data[0].SubForm1[0].Outputs[0].Competencies[0].C_COMP[0].DATA[*].QK_STEXT[0].font.weight = "bold"

or shortened to the object

$.font.weight = "bold"

Thanks anyway for those that took the time to look at it.

Answers (0)