Expand my Community achievements bar.

Multiple values for one variable?

Avatar

Former Community Member

I've created my first set of variables (using Form Properties>Variables), tweeked some XML sourcecode  and they're working .

What I'm now trying to figure out is how to have one variable that has 2 values that pop up in 2 different text fields.

Simple form at this point:

Item, Model and Service Tag.

The user selects the item from the drop down list and the Service Tag field is autopopulated from the variables I set.

How do I get the Model to appear based on the Item selection?

I tried putting the two values for one variable together but both values appear in the same field.

Variable info that works: Scan (variable) = MC3090BT (value)

I also need this particular variable to = Handheld scanner (try to ignore the redundancy).

I attempted to make MC3090BT as it's own variable with Handheld scanner as it's value, and add to the code below but it didn't work.

Here's some of the code if it helps:

<event activity="change" name="event__change">

               <script contentType="application/x-javascript">if(xfa.event.newText == "Handheld scanner"){

    servicetag.rawValue = scan.value;

}else if(xfa.event.newText == "Latitude X1"){

    servicetag.rawValue = X1.value;

0 Replies