Skip to Content
avatar image
Former Member

adobe form first data row of a table in BOLD characters


HELLO

I HAVE A REQUIREMENT WHERE THE FIRST ROW OF A TABLE SHOULD BE IN BOLD

basically the fiels are  EBELP  and  mat_desc.

and this is what i see when i  When i point to my data row in the heararchy

data.page2.Sous-formulaire2.ZTMM_EKPO.DATA::ready:form - (JavaScript, client)

 

data.page2.Sous-formulaire2.ZTMM_EKPO.DATA.EBELP::ready:form - (JavaScript, client)


 

data.page2.Sous-formulaire2.ZTMM_EKPO.DATA.MAT_DESC::ready:form - (JavaScript, client)

As i dont know too much  on script , if somebody can help me that would be great

thanks a lot.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Mar 14, 2014 at 11:33 AM

    Hello Tahar,

            

              You can achieve this using 2 methods:


    1) Using a Global variable in the Layout.

    For the First time, this global variable will be blank. If blank, then Set all the fields of a row to "Bold" and set this Global variable to "X". Now the same code will be triggered for next row. So this time,  the fields will not be set to Bold because the Global variable is set. Write the below Javascript code on the Initialize event of DATA sub form as shown below.

    if ( data.global_var == " " )

    {

         this.EBELP.font.weight = "bold";

         this.MAT_DESC.font.weight = "bold";

         data.global_var = "X";

    }

    So for next row, the font will not be bold because the Global variable is already set to "X"

    2) Using a new Column in the table.

    You can create one column in the table called Flag and in ABAP in Form Interface or Driver Program set this column to "X" only in 1st record. Set both the fields to bold only when the Flag column has the value "X". In Layout hide this Flag field. Write the below Javascript code on the Initialize event of DATA sub form as shown below.

    if ( this.flag.rawvalue == "X" )

    {

         this.EBELP.font.weight = "bold";

         this.MAT_DESC.font.weight = "bold";

    }


    Add comment
    10|10000 characters needed characters exceeded

  • Mar 14, 2014 at 10:25 AM

    Select the fields EBELP  and  mat_desc and from the field format select "plain text".

    then go to the paragraph format and select "B" for that particular fields("EBELP  and  mat_desc").

    ---

    Naveen

    Add comment
    10|10000 characters needed characters exceeded

    • did you achieve your requirement by following the below??

      if  data.page2.Sous-formulaire2.ZTMM_EKPO.DATA(1).EBELP    then put cell to bold.


      If your requirement is not achieved then separate the 1st line from the table and implement:


      Select the fields EBELP  and  mat_desc and from the field format select "plain text".

      then go to the paragraph format and select "B" for that particular fields("EBELP  and  mat_desc").

      --

      Naveen

  • avatar image
    Former Member
    Mar 14, 2014 at 10:21 AM

    hi  Tahar Yacoub  


    you can achieve this by javascript code

    here is my hierarchy

    write this code on initialize event of Row1


    Cell1.font.weight = "bold";

    Cell2.font.weight = "bold";

    hope it will work

    regards

    Jitendra.


    abcd.PNG (4.0 kB)
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      HI tahar

      have you written code like i  have written because u didn't use xfa.resolvenode and item(0) in your code

      check your code   because i have tested it is working fine and just send the image of your hierarchy..

      Regards

      Jitendra.