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

Dropdown functionality on Web vs non-Web

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

    Dropdown functionality on Web vs non-Web

    Using A5v6 I have a drop down box that receives its choices from a table called infolookup. It works fine without any hitches. I am now trying to replicate the table lookup in a dropdown box on an A5W page. The dropdown still works fine, however it defaults to the first value in my table rather than a blank as it does in native A5. Am I doing something wrong, or do I need to store a blank value in my infolookup table. If storing a blank value is the answer, how do I go about doing that?

    Thanks in advance

    #2
    RE: Dropdown functionality on Web vs non-Web

    Below is the rest of the data from the version 6 board ... I have the code to set a default in the html, however, I am NOT familiar with the tools being used by Jim so I was unable to assist further. Hopefully somebody else has used the tools and knows where he needs to place this code:

    http://msgboard.alphasoftware.com/alphaphorum/read.php3?num=15&id=1169&loc=0&offset=0&sortby=lastreply&direction=desc&thread=1169

    To set a default value in a drop down list with a5w:

    <option value="fiat" selected>Fiat

    This and more helpful information can be found at:

    http://www.w3schools.com/html/html_forms.asp

    Cheryl -

    Under which specific dialog do I enter in the value, Drop Down Properties, than Choices? Than what?

    Thanks in advance

    Jim
    Cheryl
    #1 Designs By Pagecrazy
    http://pagecrazy.com/

    Comment


      #3
      RE: Dropdown functionality on Web vs non-Web

      Hi Jim,

      Since nobody else has replied to this post yet, may I suggest that you view the source code of your component and locate where the option values are set. Once you find this portion of the code you can add the 'selected' line to the code to show the default value that you desire.

      Cheryl
      Cheryl
      #1 Designs By Pagecrazy
      http://pagecrazy.com/

      Comment


        #4
        RE: Dropdown functionality on Web vs non-Web

        Jim, what you are seeing is a differnece in the way HTML behaves compared to Alpha Five desktop forms. When you create a drop-down in HTML (which is what the components do for you), unless you explicitely define a default value, your browser will always select the first value as the default.

        If you want the default to be blank, simply add a blank choice to your drop-down.

        -Lenny

        Lenny Forziati
        Vice President, Internet Products and Technical Services
        Alpha Software Corporation

        Comment


          #5
          RE: Dropdown functionality on Web vs non-Web

          Thanks Lenny, That is what I am trying to do, I created a blank in the choices dialog, however, it doesn't appear when its published.

          Any thoughts as to why?

          Comment


            #6
            RE: Dropdown functionality on Web vs non-Web

            How can you set this conditionally based on a session variable. In other words, depending on the value of a session variable, I want the default drop down value to be different. I tried entering A5 code in the HTML tab while editing the grid component, but the change does not stick when I force a save. And I don't see where such code would be entered in the Xbasic tab. Any help is much appreciated.

            Howard
            Howard G. Cornett, Independent Consultant

            Comment


              #7
              RE: Dropdown functionality on Web vs non-Web

              Yes Jim, Selwyn and I actually noticed this problem in your app that you sent to him last night. The blank choice that you are putting in is correct. It is a bug that it is being removed and we are fixing it.

              -Lenny

              Lenny Forziati
              Vice President, Internet Products and Technical Services
              Alpha Software Corporation

              Comment


                #8
                RE: Dropdown functionality on Web vs non-Web

                Was a solution to this problem ever found?

                In some cases, such as Salutation, adding a blank record to the table works fine and the default value of blank works correctly.

                However, in other cases, I'm at a loss. For example, I have a filtered list of names to fill in a field in a grid. If the user has picked a name to fill the field, then fine, but if the user has not picked a name, then the first value appears and looks to the user as if it has been selected... not what I want.

                Adding a blank record for every possible filter is also difficult, since a user doing cleanup will likely start deleting those blank values.

                I tried figuring out an "in line style", but couldn't, and tried to put in a conditional statement in the "display" row of the choices dialog box that says if the value of the field is blank, display blank, otherwise display the dropdown, but the table fields are not available, only the fields in the dropdown table.

                Anyone have a slick solution?

                Thanks,
                Pat
                Pat Bremkamp
                MindKicks Consulting

                Comment


                  #9
                  RE: Dropdown functionality on Web vs non-Web

                  Was a solution found? Hard to say. When one of the patches came out the problem appeard to be fixed. THan another patch came out and the problem reappeared (at least in my apps). I solved the problem by putting a blank record in. I know thats not what you want to hear.

                  Comment


                    #10
                    RE: Dropdown functionality on Web vs non-Web

                    I just built a grid component using the Alpha Sports invoice header table. I created a dropdown to get a customer id and populated the drop down dynamically from the customer table. On a new record, the drop down was initially blank, and the first option was blank. There are no blank records in the table. On an existing record, there was no blank option. Do you want a blank option to show for an existing record?

                    Jerry

                    Comment


                      #11
                      RE: Dropdown functionality on Web vs non-Web

                      What I am doing is this: I have a field that is looking up its data from a table. The field is not mandatory, thus if nothing is selected I want it to appear as blank. If I do not have a blank record in the lookup table, the initial choice is the first record in table

                      Comment


                        #12
                        RE: Dropdown functionality on Web vs non-Web

                        In other words, you want a blank choice for an existing records.

                        Attached is a zip file with a component and an a5w page using the component. These were built in Alphasports. The component was created with a static dropdown. Then on the page, the choices property was overridden and replaced by a list generated with a single blank choice and table.external_record_content_get() to fill in the values from the customer table. This will give a blank choice for an existing record without having a blank record in the lookup table.

                        There are other ways to do this, but it would be nice to have the option for a blank choice in the component.

                        Jerry

                        Comment


                          #13
                          RE: Dropdown functionality on Web vs non-Web

                          Thanks Jerry -

                          I'll check it out on Monday

                          Comment


                            #14
                            RE: Dropdown functionality on Web vs non-Web

                            Jerry -

                            I loaded the component and page, I was able to see that it is showing up with blanks, but I can't see where choices property was overridden. When I open the properties, it appears as "static", when I look at the A5W page I don't see the code "table.external_record_content_get()"

                            Am I doing something wrong or looking in the wrong place?

                            Jim

                            Comment


                              #15
                              RE: Dropdown functionality on Web vs non-Web

                              Jim

                              The override code is the first code section on the a5w page just above the "compute the HTML for the Component" section. It is duplicated below.

                              choices = " | "+crlf()+table.external_record_content_get("customer","alltrim(lastname)+\", \"+alltrim(firstname)+\"|\"+customer_id","lastname")

                              tmpl_DropdownTest.field_info[1].DropdownBox.Choices = choices

                              In this example, I am showing the lastname, firstname but saving the customer_id.

                              Jerry

                              Comment

                              Working...
                              X