Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Drop Down Choices

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Re: Drop Down Choices

    Also, are you using the latest pre-release? I don't know how useful this may be to you, but I believe that there was an amendment that allowed any field to be used as the parent control of a cascading dropdown.

    Comment


      #17
      Re: Drop Down Choices

      Originally posted by agillbb View Post
      Also, are you using the latest pre-release? I don't know how useful this may be to you, but I believe that there was an amendment that allowed any field to be used as the parent control of a cascading dropdown.
      Currently I'm running the 2829-3984 pre-release build. I'll probably wait untill tomorrow to d/l and install the latest. On the pre-release, I've noticed opening alpha is considerably slower now. Slower than SolidWorks 2012! And I'm running an SSD, intel core i7 extreme, and 16gb of RAM.

      On my problem,
      I've kind of got it to work by cheating and using a lookup field that looks like a dropdown box. It's slower but it allows the filtering I needed. My problem with the lookup is if I tell it to save a different value than it displays, the field goes blank as soon as a user picks it. I really need to have the user view and pick from one row and have it save the value from a different row. This value is a file path.

      I hope they start supporting arguments in SQL queries again in the next patch because that really was the easiest, fastest and most streamlined way of doing the dropdowns IMHO. I mean, the page variables are already there for the taking. We bought alpha so we wouldn't have to write code, that was the whole point. I know tweaks are required here and there but I just don't have the time to custom code work arounds for functionality that should really be there in the first place.

      Comment


        #18
        Re: Drop Down Choices

        Yea, they should look to streamline the various ways of passing parameters and arguments between components and their parts. It is quite good, but there is some hit and miss going on. I use a javascript global variable for some of my stuff - each tab (in a tabbedui main screen) has its own sub-namespace, and I set and unset dot.variables to achieve what I need. It works very well, but only if you are comfortable with js.
        Don't give up yet on your goal - I guarantee that in a few weeks, you will have stumbled across an easy way to do what you need - just keep watching the videos and scanning the forum.

        Comment


          #19
          Re: Drop Down Choices

          OK,
          I'm trying a new workaround. In theory there's no reason I can think of that it wouldn't work; but it doesn't. Here's what I'm doing:

          1st dropdown box (Machine) queries database 1 for it's choices.
          Here's the query: SELECT DISTINCT machine, fkmmgroupid FROM machines ORDER BY machine, fkmmgroupid

          2nd dropdown box (Program) queries database 1 for it's choices. They are also filtered with the "cascading choices" checkbox.
          Here's the query: SELECT DISTINCT program, left(program, 4) AS programshort FROM programs ORDER BY program, programshort
          The filter is setup to only grab programs that match the fkmmgroupid of the machine picked in the first dropdown as follows:
          Parent control: Machine
          Field linked to parent control: fkmgroupid
          Type of field: numeric

          3rd dropdown box (Drawing) queries database 2 for it's choices
          Here's the query: SELECT DISTINCT a5fn_Number FROM drawingcardinfo ORDER BY a5fn_Number
          I'm trying to setup the filter to return the "a5fn_Number"'s that are like programshort (shortened program name) from the previous selection.
          Parent Control: Program
          Field linked to parent control: a5fn_Number
          Type of field: character

          As you may have guessed, dropdowns 1 and 2 work perfectly but the 3rd doesn't work at all. No choices are given. Since you can't pass a variable easily, one would think that the cascading choices filter would be able to be used, but it doesn't seem to work. Is it because I made up a new column with my query in the second dropdown and it can't see that information? I wouldn't think so since it's supposed to save the second column as the users choice.

          It's almost as if the alpha guys want to force me to code instead of use their dialog controls....argh! LOL

          Comment


            #20
            Re: Drop Down Choices

            What if in query 2 you wrote: left(program, 4) AS a5fn_Number

            Comment


              #21
              Re: Drop Down Choices

              Originally posted by agillbb View Post
              What if in query 2 you wrote: left(program, 4) AS a5fn_Number
              No dice....
              After monkeying about with that I tried using parameters with inline javascript again but I keep getting errors that the "subelement is not found".

              I actually had a nightmare about this stupid dialog control last night.

              Comment


                #22
                Re: Drop Down Choices

                As of build Build 2751_3953 Jun 22 2012, there should be support for what you are trying to do.
                YOu just need to make sure that all your syntax is correct. I don't know why it is not working for you.
                Note that coding a cascading box is not hard - just use a callback function to generate the dropdown values.

                Maybe try filling a dummy dropdown #2 with a few known static a5fn_Number values, set #3's parent to the dummy and see #3 works.

                See the release notes below.....
                Dialog and Grid Component - Cascading DropdownBoxes - Previously, the parent dropdownbox for a cascading dropdownbox had to be populated from the same table as the cascading dropdownbox. The parent dropdownbox could not be populated with a static list, for example.

                Now, the parent dropdownbox can be populated from a static list, or a query from a different table. To support this option, two new properties have been added to the builder where you define dropdownbox choices.

                These properties are:

                Field in query linked to parent control
                Type of field linked to parent control

                For example, say your component has two dropdownboxes: DDB1 and DDB2. The choices in DDB1 are set to a static list:

                A

                B

                C

                D

                The choices for DDB2 are dynamic. The SQL for the choices is: SELECT DISTINCT PART FROM INVENTORY.

                DDB2 is defined as a cascading dropdownbox and its parent is set to DDB1.

                By specify (say) PARTCODE as the value for the 'Field in query linked to parent control' property, the actual SQL used to populate the dropdownbox will be:

                SELECT DISTINCT PART FROM INVENTORY WHERE PARTCODE = '<value of DDB1>'

                Comment


                  #23
                  Re: Drop Down Choices

                  I think those release notes explain the problem.
                  it's using the "equal to operator" and I need a "starts with operator".

                  It works on my second dropdown box because there is a value in the parent control that is actually "equal to" values in my query. Because the third dropdown box is using a trimmed value from the second dropdown there are no entries that are actually "equal to" it.

                  So, when we were able to enter arguments into our queries (version 10) we had the sql functionality we needed at our disposal. Now, we only have what they gave us; which is a half-assed "equal to".

                  Now, I'd've thought that making the new columns (AS programshort for instance) would get around this loss of functionality, but it doesn't seem to work. I'm guessing that the alpha 5 framework must not have the ability to use it.

                  I'll give your last suggestion a shot when I get a moment.

                  Thanks

                  Comment


                    #24
                    Re: Drop Down Choices

                    I ended up doing it with a lookup edit combo box. I had tried that before and was a little dissapointed with the speed and the fact that whatever value you decide to store there from the user choice, is the one that showes up after clicking. I wanted that a5fn_number to show up and the stored value to be the File_location.

                    Well, I found out there was a field map thingy in the "edit combo field" options under "optional properties". This (THANKFULLY) was nice enough to ALLOW me to pick a different field on my dialog, in this case a hidden text box, to populate. I was able to put my File_location in there. Then I have a button that shows itself if the hidden text box has a value. This button opens up the drawing the location points to.

                    So, I've got this working for now. Not precisely what I wanted but only about 3 seconds slower than my previous alpha 5 V10 dialog. I might be able to speed that up a bit with some more filtering.

                    Comment


                      #25
                      Re: Drop Down Choices

                      Originally posted by Davidk View Post
                      In a simple test, setting my session.custType session variable in a grid's onInitializeEvent

                      session.custType = "IT"

                      Then, my dropdown box has a Dynamic select statement of...

                      SELECT DISTINCT CustName, CustType FROM tblcustomers WHERE CustType = session.custType ORDER BY CustName

                      This works for me.

                      I get errors as well when trying to use the SQL Builder and defining arguments.

                      What's the SQL Statement you want to execute?
                      I was having the same problem today and this one worked for me. Just trying to populate a dropdown based on the session.CompanyID variable.

                      SELECT DISTINCT FullName FROM Designers WHERE User_Company_ID = session.CompanyID ORDER BY FullName

                      That's my SQL statement. The Working Preview generates an error, but it works on the live server. I too tried the Arguments and it wouldn't let me. Thanks for the workaround though.

                      Comment

                      Working...
                      X