Drop List Killing Me....(Solved!)

akrayenhagen9721 Community Member Posts: 22 ☆ Roadie ☆
OK Ladies and Gents,

First, apparently I have issues posting to this board (forgive me, I'm new to this site), and my messages aren't coming through correctly. Next thank you to MATH for trying to assist me with my drop list efforts, however, your fix wouldn't work for what I was attempting to do (but I did figure it out). As many of you (being course designers) have probably experienced with training the trainers, we have to teach our soldiers (in charge of enrollments to courses) how to enroll students an ensure that certain guidelines are followed. Well this is no different. Here was my dilema:

1) I had to recreate a web page with a drop list, that when each selection was made, a set of text would pop up next to it..... Easy right? NOPE!

2) The text had to be formatted word for word what was in the original drop list.... This created some issues (Please see the attachments (If they come through)).

The drop list had multiple items with similar attributes so creating a function that ran that said, "If this (EXACT) text pops up show this text in the text box on the right of the drop list.  I tried to be crafty and make a text box that the text would change every time a  different selection was made. This failed miserably! I found small errors like extra spaced at the end that kept it from functioning, wording was to similar so two text boxes overwrote itself, the text box wouldn't fill at all, etc. So I found that using the Condition Relationship "Equal To" doesn't mean EXACTLY to, having Spaces at the end of the Value would keep it from functioning, Using the Relationship Condition of "Contains" means that if you use this and anything else in the drop list had a similar wording it wouldn't function correctly.

All this being said, we got crafty and used some "Equal To" and some "Contains" and checked each line to ensure NO extra spaces were present. We also figured out that we would have to do this in Action Groups and that no matter what, we'd have to run an Action Group to HIDE everything first every though it was set to be initially hidden.

I wanted to share this with everyone so they won't have the same issues.




  • smiller7502
    smiller7502 Community Member Posts: 181
    I want to clarify something: "Equal to" does mean EXACTLY equal to. A string of characters with a space at the end is not the same as that same string of characters without a space at the end, and should not be treated as such.

    Also, I'm sorry I didn't see your original post, because there would have been a more reliable way to go about this than combining some "equal to" and some "contains" conditions. I try never to quibble with code that works, but I do fear that your solution will be very difficult to edit six months from now when you've done 300 other things and then have to come back to this because you have to add a new item to the list.

    With JavaScript you can read an external list at run time to populate a drop-down list in your course. Doing that automatically numbers the list, so you can refer to the selected item by its number. Or maybe even better in this case, the same external list could contain both the options for your drop-down list and the text that should appear for each one.

    Search my posts on this forum an you'll find a fair amount of info on this.

  • theav-ator
    theav-ator Community Member Posts: 67 ♪ Opening Act ♪
    It may be a little less elegant than the Scripting as mentioned above, but I think this can be accomplished with just text boxes and action groups - no complex variables or conditions necessarily needed.

    - Just put the text you want to appear for each selection in its own text box (hidden) - which would be 18 boxes based on your attachments.
    - Then create action groups that hide all the other text boxes and shows which ever one you want shown.
    - Then your list is just a selection to call whichever action group is needed.
    (that is, if I correctly understand what you're trying to do)
  • dpeteranderl9908
    dpeteranderl9908 Community Member Posts: 10
    I had a look at your file. Everything was actually fine with it ... you just had some empty spaces behind some of your values and you could have added the "- " before the values - e.g. " - RC" instead of "RC" - to make sure you don't have two texts being shown simultaneously.
  • akrayenhagen9721
    akrayenhagen9721 Community Member Posts: 22 ☆ Roadie ☆
    Yes I got the List to work.