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 Box And Issue With Populate Bound Controls From List Control

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

    Dropdown Box And Issue With Populate Bound Controls From List Control

    I use some dropdown boxes for filtering a list control. They are set to allow multiple selections and maximum choice is set to zero to show all choices. The UX component has some other controls that are bound to a table so that they can be updated with a Submit command. The dropdown boxes are set not to be updateable and are unbound.

    My issue is that if I run an action to populate my bound fields from a selection in my list control, that action sets the selections in my unbound dropdown boxes fields to empty. I have some other unbound fields I also use to filter my list control, but they are not dropdown boxes and those do NOT get set to empty when I run the Populate action.

    This is giving me grief because there are times that I use a Refresh action to refresh my whole list control (because some things user can do may cause changes to more than one record in the list control), which brings back all the records in the list. But I also have a button for them to 'Resubmit Search' that is expecting dropdown boxes I use for filtering to still contain data that was entered in them before the populate and refresh actions.

    ANYWAY, my main question is ..... WHY does the action to populate bounds fields from the list control ALSO cause unbound dropdown boxes to be set to empty??

    BTW, I have not updated Alpha since April of 2015 because it has been working just fine for my needs and I have not wanted to chance rattling anything with an upgrade...
    Carol King
    Developer of Custom Homebuilders' Solutions (CHS)
    http://www.CHSBuilderSoftware.com

    #2
    Re: Dropdown Box And Issue With Populate Bound Controls From List Control

    You explain the situation, but not how it comes about.

    What commands are you using to repopulate your list controls?

    Are you repopulating each one individually or are you using a command that automatically repopulates them all for you?

    Comment


      #3
      Re: Dropdown Box And Issue With Populate Bound Controls From List Control

      I can only explain all of it by showing you with a video:
      http://www.screencast.com/t/22vgPDu45
      Carol King
      Developer of Custom Homebuilders' Solutions (CHS)
      http://www.CHSBuilderSoftware.com

      Comment


        #4
        Re: Dropdown Box And Issue With Populate Bound Controls From List Control

        ....

        Do the other dropdowns revert back to no selection?

        By the way you can use setValue and not make a component dirty by adding a false flag: {dialog.object}.setValue('MyField','Some_value',false);
        Mike Brown - Contact Me
        Programmatic Technologies, LLC
        Programmatic-Technologies.com
        Independent Developer & Consultant​​

        Comment


          #5
          Re: Dropdown Box And Issue With Populate Bound Controls From List Control

          All the dropdowns revert back to no selection, but the other fields that are not dropdown in my search window do not. Thanks for the tip. I'll try it.
          Carol King
          Developer of Custom Homebuilders' Solutions (CHS)
          http://www.CHSBuilderSoftware.com

          Comment


            #6
            Re: Dropdown Box And Issue With Populate Bound Controls From List Control

            If I remember right the action you are using clears things out by resetting the form before it populates from the list which is reasonable, the issue you have with the dropdown clearing is a product of that action. This is one of the problems when binding data to the UX (the original method) versus binging data to the list (the Detail View method) the fact the dates don't clear is probably being caused by the mask you are running on the field and it just sticks. Anyhow - the issue does not exist when the data is bound to the List control. Binding to the list control is quick and easy - so make a copy of your UX remove the UX binding and apply the Detail View - it will work. You will just need to get your new buttons from the Defined Controls List-Detail View buttons.
            Insanity: doing the same thing over and over again and expecting different results.
            Albert Einstein, (attributed)
            US (German-born) physicist (1879 - 1955)

            Comment


              #7
              Re: Dropdown Box And Issue With Populate Bound Controls From List Control

              Pete, thank you. It doesn't have to do with the mask in the dates fields. The ONLY fields that get cleared out when I run the populate action are the dropdown boxes that have a height greater than 1 and have multi-select allowed. I have tested with all of the other unbound fields in my 'search' window and they do not clear out. There are other unbound dropdown boxes on my 'search' window with a height of 1 (which does not allow the multi-select) and they do not get cleared out.

              EDIT - I DO NOT HAVE MORE THAN ONE FIELD BOUND TO SAME DATA as I stated previously in this post! So never mind. I might try the detail view, but now for expediency, I am going to go test the suggestion by Mike about setting those dropdown box values without making the UX component dirty.
              Carol King
              Developer of Custom Homebuilders' Solutions (CHS)
              http://www.CHSBuilderSoftware.com

              Comment


                #8
                Re: Dropdown Box And Issue With Populate Bound Controls From List Control

                Well, I tried the suggestion by Mike about setting the dropdown box values without making the UX component dirty, and it does keep the component from being dirty, which is good. But for some reason, my Resubmit Search now 'thinks' those dropdown box fields are empty and returns all records, EVEN though when I open my 'search' window the dropdown boxes ARE still set to the values. Running my filter action by opening the window and running it from there DOES resubmit the same search. But running my filter action from my Resubmit Search button does NOT (UNLESS I have opened my 'Search' window first). The code behind the Search button on my 'search' window and the Resubmit Search button BOTH call the same action to filter the list.

                I don't know.... guess I might do away with my Resubmit Search button and make them open the 'search' window. At least the values will still be set without making the component dirty.
                Carol King
                Developer of Custom Homebuilders' Solutions (CHS)
                http://www.CHSBuilderSoftware.com

                Comment


                  #9
                  Re: Dropdown Box And Issue With Populate Bound Controls From List Control

                  Here is an idea ... You said that the values are retained when you open search? ...and that "Resubmit Search" button effectively just "presses" the search button but with out needing to reopen the search window? ...if I have all of that correct how about using {dialog.object}.buttonClick('Your_Search_Button_Control_Name');.
                  Mike Brown - Contact Me
                  Programmatic Technologies, LLC
                  Programmatic-Technologies.com
                  Independent Developer & Consultant​​

                  Comment


                    #10
                    Re: Dropdown Box And Issue With Populate Bound Controls From List Control

                    PMFJI, but I was just about to post with a similar problem (I think). Rather than starting another thread, I thought I'd state the issue in another way and provide a small component to reproduce it.

                    In my case, I have a UX with several fields bound to a table (could be SQL OR DBF, in the test case it's DBF), plus a dropdown that is UNBOUND. It is set to use Static Data but I fill it from an Xbasic function. I use Server Side actions in the initialize and validate events to populate/save the bound fields. When I run the component in working preview the bound fields populate and the dropdown shows the first entry. No problem. HOWEVER, if I add a "Submit-Reset" button set from "Defined Controls" and run the component, then the dropdown shows up empty. Remove the button set, rerun and the dropdown again shows the first entry.

                    I don't know if this is the same as or connected to the OP's issue, if it is deemed to be unrelated then I'll start another thread. Attached is a zip of the test workspace.
                    Attached Files

                    Comment


                      #11
                      Re: Dropdown Box And Issue With Populate Bound Controls From List Control

                      I did try your suggestion, Mike, to just call the click of my Search button, and didn't have any different result, although it IS much more expedient to do that. But it did lead me to the solution.. I then tried changing the Resubmit button to open the search window (because opening that window was seeming like it was the key), then do the click of the button (via code) which also closes the search window. That did not help either. So I thought I'd better take a look at what happens with my button to just open the Search window and realized that it was FIRST setting my list control to empty, but that my Resubmit Search button was not. So.... I put in the code to first set the list control to empty on my Resubmit Search button, and all started behaving. I can't remember for sure why it was necessary to set the List Control to empty in the first place (back when), and I don't understand why it is only necessary if my filtering is based on dropdown box selections, but NOT if my filtering is only based on search criteria from fields that are NOT dropdown boxes. Oh well....

                      I have now used a combination of suggestions received in this thread which has given me success! THANK YOU TO ALL.

                      Here's the javascript behind my Resubmit Search button: (BUTTON_1 is the 'Search' button on my 'search' window and runs an action to filter records in my LIST1 list control.)
                      Code:
                      {dialog.object}.setValue('LIST1','');
                      {dialog.object}.buttonClick('BUTTON_1');
                      Here is the code I'm using when a user clicks an icon on a record in my List1 list control (to edit a record):
                      The action to EditRecord opens a container window that has fields that are populated with the PopulateControlsFromList1 action.
                      Code:
                      //first get values in dropdown boxes on WINDOW_3 (the Search window)
                      //then run the populate controls from list action
                      //then set the values in the dropdown boxes on WINDOW_3
                      //This is because the populate controls action clears out dropdown boxes that allow multiple selects
                      var vendorFind = {dialog.object}.getValue('VENDORFIND');
                      var vendorTypeFind = {dialog.object}.getValue('VENDORTYPEFIND');
                      var glNumFind = {dialog.object}.getValue('GLNUMFIND');
                      var paidStatusFind = {dialog.object}.getValue('PAIDSTATUSFIND');
                      var jobFind = {dialog.object}.getValue('JOBFIND');
                      var costCodeFind = {dialog.object}.getValue('COSTCODEFIND');
                      {dialog.object}.runAction('PopulateControlsFromList1');
                      setTimeout(function(){
                      	//The false at end of set value lines means ux component will not be set to dirty
                      	{dialog.object}.setValue('VENDORFIND',vendorFind,false);
                      	{dialog.object}.setValue('VENDORTYPEFIND',vendorTypeFind,false);
                      	{dialog.object}.setValue('GLNUMFIND',glNumFind,false);
                      	{dialog.object}.setValue('PAIDSTATUSFIND',paidStatusFind,false);
                      	{dialog.object}.setValue('JOBFIND',jobFind,false);
                      	{dialog.object}.setValue('COSTCODEFIND',costCodeFind,false);
                                    {dialog.object}.runAction('EditRecord');
                      },2000);
                      Last edited by kingcarol; 03-30-2016, 11:32 AM.
                      Carol King
                      Developer of Custom Homebuilders' Solutions (CHS)
                      http://www.CHSBuilderSoftware.com

                      Comment


                        #12
                        Re: Dropdown Box And Issue With Populate Bound Controls From List Control

                        Yeah!
                        Mike Brown - Contact Me
                        Programmatic Technologies, LLC
                        Programmatic-Technologies.com
                        Independent Developer & Consultant​​

                        Comment


                          #13
                          Re: Dropdown Box And Issue With Populate Bound Controls From List Control

                          Thats good - a WIN!
                          Insanity: doing the same thing over and over again and expecting different results.
                          Albert Einstein, (attributed)
                          US (German-born) physicist (1879 - 1955)

                          Comment


                            #14
                            Re: Dropdown Box And Issue With Populate Bound Controls From List Control

                            Originally posted by kingcarol View Post
                            ... I can't remember for sure why it was necessary to set the List Control to empty in the first place (back when), and I don't understand why it is only necessary if my filtering is based on dropdown box selections, but NOT if my filtering is only based on search criteria from fields that are NOT dropdown boxes. Oh well....[/CODE]
                            Carol, the situation you've described reminds me of an bug/issue that I un-successfully argued with Alpha about getValue not working with a particular control I had on a UX if the UX was not dirty. Perhaps you were clearing the selections of the find lists as a way to make the UX dirty so that a subsequent getValue would work correctly.

                            Comment


                              #15
                              Re: Dropdown Box And Issue With Populate Bound Controls From List Control

                              Rich, it does seem like it was something like that... A year or more ago when I first did that component and was trying to filter the list but had issues, Alpha or somebody had me set the list to empty. Was just recently I was adding my Resubmit Search button and I had forgotten about that. I think it was because it didn't make sense to me in the first place.
                              Carol King
                              Developer of Custom Homebuilders' Solutions (CHS)
                              http://www.CHSBuilderSoftware.com

                              Comment

                              Working...
                              X