cancel
Showing results for 
Search instead for 
Did you mean: 

Changing include text based on value in another field.

0 Kudos

Hello,

I have 12 different include texts for different reason codes associated with payment difference, I need to display the respective text on the form based on the value in the reason code field, I am trying to figure out how this can be achieved. I populated the Text name and reason code into 1 internal table and passed it to the form context. Please suggest.

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hello,

I am new to adobe forms and have no idea on using scripts. Can you please elaborate if possible, I am not using a dropdown list for reason codes, it comes in from the interface and do i have to define all the include texts in the form context.

rakesh_m2
Contributor
0 Kudos

Hello Kiran,

If the number of reason codes are static then for the include text, in context mapping, in conditions tab declare the condition like

reason_code = 1.

Now, put 12 text fields one on another such that it overlapps.

If chances are there that include texts may increase, I will give you the scripting code how to do it.

Please let me know, if you need some scripting.

Thanks,

Rakesh.

Former Member
0 Kudos

Hi,

you can achieve this using script. Use the event "Initialize" and do your script there. This code snippet will help you:

var name = "Hello " + $record.name.value;

this.resolveNode("result").dataNode.value = name;

Best,

Thomas

Former Member
0 Kudos

If the reason codes are present as a dropdown, then you can get the value using below codes.

dropdown.selectedIndex

dropdown.getDisplayItem

Thanks,

Aravind