Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to populate two data alternately in one field in Adobe Form

Piyushmatrixs
Participant
0 Kudos

Hi,

   I have one requitrement regarding Adobe Forms. There is an Internal table IT1 having field f1, f2, f3. F1 is flag. On form I have a form field that would display data  from IT1 based on flag "F1". If F1 is initial form field display data from F2, if F1 is not initial it will display data from F3.

   Can you tell me how to do this?


Thanks

Piyush

6 REPLIES 6

custodio_deoliveira
Active Contributor
0 Kudos

Hi Piyush,

You can add conditions in the context tab of the form as in this (silly) example:

Regards,

Custodio

0 Kudos

Hi Custodio,

First thanks for your response. Have a look at snapshot of requirement.

Internal Table IT_Totaldue have 3 fields WAERS, TBAL and L_TBAL. On form there is one cell (field) named L_TBAL for output. I have to display data either of TBAL or of L_TBAL in output field like below condition:

     if waers = USD then

        display output_field = TBAL

     else

        display output_field = L_TBAL

      endif.

Can you tell me complete way or script to do this?

Thanks & Regards

Piyush

0 Kudos

Hi Piyush,

One of the options you have is to add another field to this table, say display_value. Then you can populate this field in the interface, under code initialization. Do something like:

LOOP AT it_totaldue ASSIGNING <ls_totaldue>.

if <ls_totaldue>-waers = 'USD'.

<ls_totaldue>-display_value = <ls_totaldue>-TBAL..

     else.

<ls_totaldue>-display_value = <ls_totaldue>-L_TBAL..

      endif.

ENDLOOP.

Or you do the same in the program that calls the form, if possible.

Cheers,

Custodio

0 Kudos

Hi,

I can not do it in driver program or in interface. Can you tell me the way or script that I could use in/on adobe form? In a single cell of form I have to display either Tbal (field of S_kunnr.it_totaldue) or L_Tbal (field of S_kunnr.it_totaldue) based on condition

   if S_kunnr.it_totaldue.waers = "USD"

          cell on form = S_kunnr.it_totaldue.tbal

   else

          cell on form = S_kunnr.it_totaldue.L_tbal.

   endif.

Can you provide me complete script for this?

Thanks

Former Member
0 Kudos

Hi Piyush

try this one out.

In the WAERS node try the below javascript in initialize event.

if(this.rawValue == 'USD')

this.value = tbal value

else

this.value = l_tbal value

endif.

0 Kudos

Hi,

I am not good in scripting . Can you have a look at above snapshot and write full script that I could copy and paste in my form.

Thanks

Piyush