cancel
Showing results for 
Search instead for 
Did you mean: 

Footer for each table's line

Former Member
0 Kudos

Hi to all,

Hi to all,

I got a question and I hope that I find the answer here.

I'm having a table and I need to add footer (remark) in each line

Record1- Field 1

Record1- field 2

Record1- field 3

Record1- R e m a r k s

Record2- Field 1

Record2- field 2

Record2- field 3

Record2-R e m a r k s

This is easy I can do it,

But the difficult thing for me is: (here a question )

If a remark exists in this field for the record, then add a line with the text contained in the field (like above )

If there is no remark do not print and do not leave a gap between the Record lines.

So I need the table be like this (If we consider that record 1 and 3 does not have remark.

Record1- Field 1

Record1- field 2

Record1- field 3

Record2- Field 1

Record2- field 2

Record2- field 3

Record2-R e m a r k s

Record3- Field 1

Record3- field 2

Record3- field 3

Record4- Field 1

Record4- field 2

Record4- field 3

Record4-R e m a r k s

Regards,

Accepted Solutions (1)

Accepted Solutions (1)

OttoGold
Active Contributor
0 Kudos

You can always write a script (put it to the row subform). Test if there is a value in you remark field, and if not just call PATH.remark.presence = "hidden". If your subforms structure is properly configured (content: flowed and the right direction), your blank remark field will disappear and the next row moves upwards. Do not forget to set all contents to flowed and if needed subform height to aout-fit (tab layout). Hope this helps, have a nice day, Otto

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi

thank you you were helpful;

i solve it , i am so happy now

here the code

var norows = xfa.resolveNodes("data.table.DATA.Detail.TABLE.Data[*]").length;

for ( var i =0; i<norows; i++)

{

if(xfa.resolveNode("data.table.DATA.Detail.TABLE.Data["i"].REMARK").rawValue == null || xfa.resolveNode("data.table.DATA.Detail.TABLE.Data["i"].REMARK").rawValue == "")

{

xfa.resolveNode("data.table.DATA.Detail.TABLE.Data["i"].REMARK").presence = "hidden";

}

}

OttoGold
Active Contributor
0 Kudos

If you don´t understand the concept of DATA you´re sure about the path, but a wrong one:))

You have a table in your interface/ context, like yourpath.TABLE which is bound to the table subform. To address a line of the table you need to have a subform for a row, which is bound to DATA[*] and which has "repeat for each data" selected in the binding tab. Next you can address the single field of the row.

It is like:

DDIC table yourpath.TABLE binding

DDIC row DATA[*] binding (nothing before and after this 7 chars string)

DDIC row field FIELD (nothing before or after the field name)

Otto

OttoGold
Active Contributor
0 Kudos

Hello,

there were some tables involved or not?

In this: data.table.DATA.Detail.TABLE.Data.REMARK.presence = "visible"; i see nothing working with the tables.

Where is DATA[*] etc.? Maybe if you don´t understand the concept or you´re still a bit confused about the binding/ addressing, you should use the script editor help (if the path you provide of the form hierarchy is ok, the editor helps you address the next node, this way you know you´re still correct with addressing) or/and use the little arrow mark next to the binding field which is a "wizard" to help you work with the binding visually (and you won´t write incorrect binding paths any more).

Good luck with this, Otto

Former Member
0 Kudos

Yes there is tables involved

and i am sure about Path

but I don´t understand the concept of DATA[*]

Former Member
0 Kudos

Hi

fine

but in which event should i write the scripting .

here what wrote in row subform and in events( layout ready; form ready) (I set remarks field as Hidden)

If ( data.table.DATA.Detail.TABLE.Data.REMARK.rawValue != null || data.table.DATA.Detail.TABLE.Data.REMARK.rawValue != " " )

{

data.table.DATA.Detail.TABLE.Data.REMARK.presence = "visible";

}

else

{

data.table.DATA.Detail.TABLE.Data.REMARK.presence = "hidden";

}}

but its not working

Former Member
0 Kudos

Hi,

I would build the table using subforms and then rearrange the fields for the table row (since it is a subform it is possible) and use scripting to show and hide the remarks.

Regards,

Juergen