Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Drop-down Lists

Avatar

Level 2

I have 3 Questions regarding drop down lists:

1: I have 500 entries in excel that I would like to import into a drop down list. How do I do this without having to add each entry into the drop-down field by pressing the plus sign and pasting each entry at a time?

2: I would like to design the form so That when I push a button a drop-down list will appear. Under the insert tab, under custom there is a Subform instance controls: Add      I thought this custom feature would allow me to some how link two subform (in this case a drop-down list and button) so that when I push the button a drop-down list would appear and if I don't push the button, one will not exist.

3: When my drop down list is populated with 500 different entries I would like to format the drop-down list so that when the user is using this form he/she can narrow the list of entries by adding custom text into the drop-list field and only entries containing the characters entered will show.

     I was experimenting with this by adding numbers 1-20 to the drop-down list and checking the allow custom text entry box. If I were to type in the field without clicking the drop down arrow none of the list entries would show - only the characters typed. In order for the search field to narrow I had to click the drop down arrow, highlight the field and then type. Is there any way to alter the drop-down properties so that I don't have to click the drop down arrow in order for the list entries to appear when I start typing? The form I am constructing needs to be as efficient as possible.

Your assistance would be greatly appriciated! Thanks

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Just replied on the email that you sent me ....if you are happy with the result can I post the form here so others can benefit from this example?

Paul

View solution in original post

8 Replies

Avatar

Former Community Member

1. In version 9 of Designer the capability to add items through the clipboard was added. See the image below:

Image1.png

If you do not have version 9 then you have no choice but to add them one by one.

2. You would have to define both the button and the DDlist in the design. The DDList presence property (bottom of the Object/Field palette) can be set to invisible. This will be the initial state of the DDList. Now on the click event of the button this code will activate the DDlist (assume the name of the DDlist is myDDList)

myDDList.presence = "visible"

Will you need a mechanism to reverse the operation if the users changes their mind?

3. You can only use the 1st letter of the item to narrow the list down ....so if I type m then the list will scroll to the m section.

Hope that helps

Paul

Avatar

Level 2

In response to the answer in question 2, regarding pushing a button to make a DDlist appear.

I did exactly what you said and still the ddlist will not appear. Below I have pasted the xml code and highlighted in red what I added. Is this correct?

  <field name="Button1" y="31.75mm" x="92.075mm" w="28.575mm" h="6.35mm">

               <ui>

                  <button Ship_To_Address.presence="visible"/>

               </ui>

               <font typeface="Myriad Pro"/>

               <caption>

                  <value>

                     <text>Button</text>

                  </value>

                  <para vAlign="middle" hAlign="center"/>

                  <font typeface="Myriad Pro"/>

               </caption>

               <border hand="right">

                  <?templateDesigner StyleID apbx2?>

                  <edge stroke="raised"/>

                  <fill>

                     <color value="212,208,200"/>

                  </fill>

               </border>

               <bind match="none"/>

               <event Ship_To_Address.presence="visible"/>

            </field>

         </subform>

         <?templateDesigner expand 1?></subform>

Is there an easier way to define a clicking event without having to alter the code. BTW I am using version 8 of the design ES

Avatar

Former Community Member

Are you adding the script to the source XML? If so you shoudl not do that ...there is a script editor provided for these purposes.

On the Window menu make sure the script editor is selected....that will activate the script editor window. Also make sure that you save the form as a dynamic PDF.

If it is still an issue you can send the form and a description of the issue to LiveCycle8@gmail.com I will have a look.

Paul

Avatar

Level 2

Paul,

Thank you very much for your help so far. To save time entering data into the DDlists I have upgraded to LifeCycle version 9….which has made my life much easier.

I figured out how to set button actions and paste from the clipboard into a DD list.  The form I am working on is a vinyl fencing order form. On this form there are 6 different styles of fence 200-700 and atleast 30 different sub styles within each style.

What I need to know now is:

1.       How to program the sheet so that when you push the ADD Button (for instance, add style 200) more than once it will create a style 200 DDlist each time you push it. In many cases our customers order multiple sub styles within a style.

2.       When I push (for example, add style 600) I would like the DDlist to appear at the top of the sheet -below the item information heading - and not in the original position where the sub form was created.  Space cannot afford to be wasted.

3.       In the Total (text field) can that text field be set to multiply the two previous text fields (Quantity and Unit Price) together?

Avatar

Correct answer by
Former Community Member

Just replied on the email that you sent me ....if you are happy with the result can I post the form here so others can benefit from this example?

Paul

Avatar

Level 2

Yes you can post the reply. Why did my buttons stop working after I made a few additions? I simply copied the code...

Avatar

Former Community Member

The structure of the form changed so I had to update the references ......

Here is the final version of the form that I worked on in case others want to see how it worked.

Paul

Avatar

Level 1

Hi pguerett,

    I saw the FinalVinylOrderform_Pauls.pdf and i must say it's really good and in my form am able to achieve 80% of what i need. The problem is with the Drop - down list. In the above pdf form you see the customer info DD(Drop-down) similarly am having a Nationality DD but the scenario is am using this DD multiple times in my form and when i want to add a new nationality i have to manually add at all the places where i am using this DD.

Is there a way that i upadte or add a new value only at one place and the change gets reflected at all the places where am using the DD, meaning the DD pulls the lookup value only from one source so that i don't have to manually update the value for each field specifically.

Thanks

Sourabh

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----