Expand my Community achievements bar.

SOLVED

Dynamic 1D Barcode From Multiple Dropdown Lists

Avatar

Level 1

I've been working on this for awhile and I can't seem to get it right. I'm using formcalc. I have a dynamic PDF form I've created with two dropdown lists. One dropdown list has items such as "New" or "Used" and the second dropdown list has a list of prices, like "99¢" or "$1.99", etc. At the bottom of the form, there is a Barcode 128 barcode item that is set to calculated - read only. I'm trying to use some logic to combine the two, where if you selected "New" and "99¢" it would make the rawvalue of the barcode "NEW1" or something along those lines.

Here's what I have so far:

TopmostSubform.Page1.Shape.DropDownList1::calculate - (FormCalc, client)

if (DropDownList1.value == "New" and DropDownList2.value =="99¢") then BarCode1.rawValue == "NEW1" endif

What am I missing here?

1 Accepted Solution

Avatar

Correct answer by
Level 6

Please check the updated code below.

if (DropDownList1.value == "New" and DropDownList2.value =="99¢") then BarCode1.rawValue == "NEW1" endif

Updated: if (DropDownList1.rawValue == "NEW" and DropDownList2.rawValue =="99") then Code128BarCode1.rawValue = "NEW1" endif

changes are highlighted and another one is: BarCode1.rawValue = "NEW1" ( "=" not two"==". Two eqals "=="  for comparison only, not for assignment)

-Raghu.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 6

Please check the updated code below.

if (DropDownList1.value == "New" and DropDownList2.value =="99¢") then BarCode1.rawValue == "NEW1" endif

Updated: if (DropDownList1.rawValue == "NEW" and DropDownList2.rawValue =="99") then Code128BarCode1.rawValue = "NEW1" endif

changes are highlighted and another one is: BarCode1.rawValue = "NEW1" ( "=" not two"==". Two eqals "=="  for comparison only, not for assignment)

-Raghu.

Avatar

Level 1

Raghu,

Thanks, that is exactly what I was missing!