Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Changing the caption of dropdown field

Avatar

Level 4

Hi All,

I am trying to change the caption of some drop down field based on some condition. The following condition is written on some other dropdown feild:

 

if (this.rawValue == "Ad Hoc Payments")

{    

     xfa.resolveNode("form.PaymentDetails.ddlInvoiceFrequency.caption.#text").rawValue = "TEST CAPTION";

}

But, it seems to be not working.

Any help would be highly appreciated.

Thanks,

Vijay.

1 Accepted Solution

Avatar

Correct answer by
Level 2

Try with this:

delete the caption in the object field palette and type this in the change event:

if( xfa.event.newText == "Ad Hoc Payments") this.caption.value.text.value = "TEST CAPTION";

View solution in original post

0 Replies

Avatar

Correct answer by
Level 2

Try with this:

delete the caption in the object field palette and type this in the change event:

if( xfa.event.newText == "Ad Hoc Payments") this.caption.value.text.value = "TEST CAPTION";

Avatar

Level 5

Or try this:

if (YourFieldName.rawValue == "Ad Hoc Payments")

{

    xfa.resolveNode("YourTargetFieldName.caption.value.#text").value = "Alternate Caption:";

}else

{

    xfa.resolveNode("YourTargetFieldName.caption.value.#text").value = "Caption:";

}

Helpful?

Kind regards Mandy

Avatar

Level 4

Thanks Zampazampa,

Your solution helped.

Thanks once again.

Avatar

Level 4

Thanks nele_sonntag,

Your solution helped.

Thanks once again.

Avatar

Level 5

Hi Vijay,

great. I'm glad that I could help you

I think it's god for the other user if you select "correct answer". Then the other users know that your problem is solved.

Kind regards Mandy