Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Table with subform: manage the font (size, color) of each recording

Avatar

Avatar
Validate 1
Level 1
Christopher95
Level 1

Likes

0 likes

Total Posts

17 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
Christopher95
Level 1

Likes

0 likes

Total Posts

17 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
Christopher95
Level 1

17-01-2021

Hi there, 

I have a data table that I display via subforms and I would like for some lines to be able to modify the font (size, color, style etc) from a field in my current data line.

Example:

. my data table:

LAST_NAMEFIRST_NAMECHANGE_STYLE
HAMILTONLEWISX
RAIKKONENKIMI 
SENNAAYRTONX
ALONSOFERNANDO 

 

Now, when this data are displayed in my PDF, i would like, for example, the following result:

LAST_NAMEFIRST_NAMECHANGE_STYLE
HAMILTONLEWISX
RAIKKONENKIMI 
SENNAAYRTONX
ALONSOFERNANDO 

 

The new style of the row (line 1 and 3 in my example) is applied if the field 'CHANGE_STYLE' is equal to 'X'.

Is it possible to do that? in javascript i suppose.

 

Thank for any help.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
Employee
Kosta_Prokopiu1
Employee

Likes

133 likes

Total Posts

317 posts

Correct Reply

88 solutions
Top badges earned
Establish
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Establish
Employee
Kosta_Prokopiu1
Employee

Likes

133 likes

Total Posts

317 posts

Correct Reply

88 solutions
Top badges earned
Establish
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
Kosta_Prokopiu1
Employee

24-01-2021

Hi,

the layout.ready event is the one you must use for such changes to field formatting. But I approach it slightly different then you I guess. The linked example takes 2 seconds to render a 1000 row table (which is good). I created a very rough subform based table and make a pseudo data fill with a script. See if that works for you.

https://documentcloud.adobe.com/link/review?uri=urn:aaid:scds:US:14266d35-a169-4ea7-9d90-20ee62e36c2...

 

Answers (1)

Answers (1)

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

394 likes

Total Posts

2,686 posts

Correct Reply

490 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

394 likes

Total Posts

2,686 posts

Correct Reply

490 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

21-01-2021

Hi,

 

this is posibble. All you need is a scritpt in the layout ready event of the row. 

Given the cells are named LAST_NAME, FIRST_NAME and CHANGE_STYLE it could look this way: 

var bStyle = this.CHANGE_STYLE.rawValue === "x" ? true : false;
this.LAST_NAME.font.weight = bStyle ? "bold" : "normal";
this.LAST_NAME.font.underline = bStyle ? "1" : "0";
this.FIRST_NAME.font.fill.color.value = bStyle ? "51,102,255" : "0,0,0";
this.FIRST_NAME.font.posture = bStyle ? "italic" : "normal";
this.FIRST_NAME.font.size = bStyle ? "8pt" : "10pt";
this.FIRST_NAME.font.underline = bStyle ? "1" : "0";

 

radzmar_0-1611256200976.png