Skip to Content

How to display either field f1 or field f2 in one cell on Adobe Form

Hi experts,

I have a requirement that I have to populate a table of line item in adobe form. I am providing a few fields of that internal table (IT_MAIN):

field ==> it_main.data[*].waers

field ==> it_main.data[*].dmbtr

field ==> it_main.data[*].dmbtr_conv

Suppose Form have 2 fields (column) one for waers and second for Amount

if field( first column) waers = USD, then second field (second column) on form value would be "dmbtr", otherwise second field (second column ) value would be "dmbtr_conv".

like below:

____________________

| column1 | column2 |

if | USD | dmbtr |

if | IDR | dmbtr_conv |

I had written a simple script, but it is not working correctly. If It_main have only one line item, it works fine but if it_main have more that one line item then it display nothing in second column.

Script I wrote in Form:ready event is:

==========================================

var getcurr = xfa.resolvenode("xfa.record.it_main.data[*].waers").value;

var v_dmbtr = xfa.resolvenode("xfa.record.it_main.data[*].dmbtr").value;

var v_dmbtr_conv = xfa.resolvenode("xfa.record.it_main.data[*].dmbtr_conv").value;

if ( getcurr == "USD" )

{

this.rawValue = v_dmbtr;

}

else

{

this.rawValue = v_dmbtr_conv;

}

===========================================

But it is not working.

How to do this?

Thanks

Piyush

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Dec 04, 2014 at 09:30 PM

    Hello Piyush,

    I would suggest you to do this in ABAP and not in Javascript.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.