4 Replies Latest reply: Mar 26, 2014 12:21 PM by Jeremiah Kurpat RSS

    Alternate state and list box

      Hi there,


      Is there any way that when I select Item in the List Box 1 (alternate state A)

      will automatically be selected in List Box 2 (alternate state B)

      * the same item (selection).



        • Re: Alternate state and list box
          Jeremiah Kurpat

          Yes see attached example. You can add a trigger in document properties on the Trigger Tab for the field you want. Field ->On Select and/or Field-> OnChange. Then add the trigger Copy State Contents with Source state (maybe $) to target state (maybe State1). Then the selection of Listbox 1 should automatically set the listbox in the alternate state.


          Hope this helps!

            • Re: Alternate state and list box

              QV_Help2.jpgHi there,

              I still have some problems with this. Not sure what should be in "Source State" field and "Target State" field. Also what about "Alternate State" field?


              My List Boxes fields are:

              Cost Centre A (alternate state A)

              Cost Centre B (alternate state B)


              Please see attached picture:

                • Re: Alternate state and list box
                  Jeremiah Kurpat

                  Well Source would be your Alternate State A, the Target would be B (Check my example qvw, I use the default state ($) as source, and State1 for the target). The Alternate State box won't do anything in this instance.


                  This action however will copy the entire contents of your first state into your target state, not just one selection. If this is okay, then this will work.


                  If you just want one field to transfer to your B state, then you could use the trigger Select in Field instead, with Alternate State switched to state B and:


                  Field: [Cost Centre]

                  Search String: ='(' & GetFieldSelections([Cost Centre], '|') & ')'


                  Note, however with GetFieldSelections, it will only list out only about 8 or so selections. So you may need to put a number that's greater than the number of values you will select like:


                  ='(' & GetFieldSelections([Cost Centre], '|', 100) & ')'


                  Hope this helps!

              • Re: Alternate state and list box

                Use a Field Event Trigger ('On Change' type) on the field of list box 1 with a Select in Field on field of list box 2.