Drop down list text value in Livecycle Designer


Last week I had to get the chosen item from a drop down list in a PDF Livecycle Designer Form. Easy enough you should think.

But it did not work as I thought it would work.

As you would think the : $.rawValue would get you the item you want. But I did not want to have the item value but the text value.

If you put something like this into a drop down field.

1 : Amsterdam
2 : Rotterdam
3 : Den Haag
4 : Leiden
5 : Wolphaartdijk
6 : Goes

And you pick like number 3, with a $.rawValue you get 3 as the value back.

But I want “Den Haag” as a return value.

Simple you use $.formattedValue

And that will give you  Den Haag !

Theo van der Sluijs

Theo van der Sluijs (1975) is Software Development Manager at Bax-shop.nl. You can read more in dutch on his “Dutch Blog“, he also created Gebruikmaar.nl. He is a member of the Board of the Dutch Flex Usergroup and Goesweb.net.

Google+ Twitter LinkedIn 



VN:F [1.9.13_1145]
Rating: 7.4/10 (5 votes cast)
VN:F [1.9.13_1145]
Rating: +2 (from 2 votes)
Drop down list text value in Livecycle Designer, 7.4 out of 10 based on 5 ratings

Related Posts

5 comments

  1. Sandro

    Thanks Theo. I had exactly that problem – and you saved me a lot of time…

    VA:F [1.9.13_1145]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.13_1145]
    Rating: 0 (from 0 votes)
  2. Hi Theo,

    I have a problem in the same category as your tutorial.

    I’ve made an order form and in a Drop-Down List under “Object”->”Binding”->”Specify Item Values”, I have given each Text (product) a value.

    Then in a numeric field the value is surpose to show up according to the Product the buyer has choosen from the Drop-Down List.

    I did some research on the Web and I found this formcalc coding:

    UnitPrice.rawValue = Description.rawValue;

    Which I wrote under “change” for the Drop-Down List.

    Now here’s my problem. The value only occures if I click twice on the same product in the Drop-Down List. I of course want the value to appear after just 1 click!

    Do you have any clue what could be wrong with my form?

    Cheers

    VA:F [1.9.13_1145]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.13_1145]
    Rating: +1 (from 1 vote)
  3. Hello,

    I’m having the same problem that Benja is having………………. Does anyone knows how to fix that?

    VA:F [1.9.13_1145]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.13_1145]
    Rating: 0 (from 0 votes)
  4. You might have figured this out already but just incase if you are wondering how to find a specified value for an option in a drop down list then use "boundItem" method like this:

    $.boundItem(xfa.event.newText);

    VA:F [1.9.13_1145]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.13_1145]
    Rating: 0 (from 0 votes)
  5. How to dynamically block elements of the list?
    Mike

    VA:F [1.9.13_1145]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.13_1145]
    Rating: 0 (from 0 votes)

Leave a Reply

Get Adobe Flash playerPlugin by wpburn.com wordpress themes