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

Refreshing list data

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

    Refreshing list data

    I having a problem refreshing data in a mobile application in drop down list controls
    A little background so the problem is easier to understand.

    I am a volunteer member of the Sun City Sheriff Posse. I volunteered to help them build some web and mobile applications for dispatching and other functions.
    I am using AA to build these applications.
    One of the services the Posse offers is Vacation Watch; when homeowners (mostly snowbirds) leave thier homes vacant to extended periods, they can request Posse members regularly visit the site and see if there are any issues.

    The vacation watch requests are stored in a table. The visits made to the home sites are stored in a child table.
    Every couple of weeks, a site visit schedule is created and routes are assigned. This schedule is stored in another table.

    I have built a mobile application that user a list control to view the addresses scheduled to be visited.

    Since the schedule contains dates for a two week period and also contains a number of "routes" and "vehicles" that may be assigned to the routes, it is necessary to filter the list for each specific users.

    To filter the lists the first panel on the application contains two cascading drop down lists.
    The first drop down list shows date contained in the schedule table.
    The second list shows valid routes for the date selected in the first drop down.

    So the user first selects the date for the route and then list two only shows valid routes for that date.

    Once these selections are made, a button is enabled that filters the list control, navigates to the next panel displaying the address for that date and route.

    Everything works perfect in development.

    Now to the problem.

    The application is loaded on the mobile device via phone gap and google play developments site.
    Everything works well until new records (every two weeks) are added to the schedule table.
    The drop down list do not refresh, they will retain the list of records loaded during the last install.
    To overcome this problem, I added a "refresh data" button to the first panel BUT that only refreshes the data in the list.
    If the drop down control data does not refresh, the new dates (in the new records) are not available.

    So, the questions are (1) why do I have to force the list data to refresh, and (2) how do I get drop down lists to refresh?
    Attached Files

    #2
    Re: Refreshing list data

    You really should look at the SQLite Videos UX_V12-151 & UX_V12-153 as your solution.
    Insanity: doing the same thing over and over again and expecting different results.
    Albert Einstein, (attributed)
    US (German-born) physicist (1879 - 1955)

    Comment


      #3
      Re: Refreshing list data

      If I understood the problem correctly, it seems to me that you should, in the list control event "afterRefreshData" add some code that in the end will use the populateDropdownBox method.

      https://www.alphasoftware.com/docume...x%20Method.xml

      The "hardest" part will be building the array to use for the "data" part.

      I use this method all the time but almost always start off with an empty, static dropdown (ie. not one configured to be bound to an AlphaDAO data source) That being said, I store all my data on the devices in SQLite databases and am basically forced to use this approach of using the populateDropdownBox method.

      EDIT: Just found this which could be a better solution for your case:
      https://www.alphasoftware.com/docume...s%20Method.xml
      Last edited by jgrannis; 06-08-2017, 09:44 AM.

      Comment


        #4
        Re: Refreshing list data

        I can't really see how SQLite would help in this situation. This is a refresh data from the server issue.

        The title of the post reads "Refreshing list data" but you write about refreshing the data in "drop down list controls", "drop down list", and "drop down control data".

        So... some clarification is needed. Are you working with a DropDownBox Control or a TextBox Control configured as an Edit-Combo List?

        You also wrote that you added a "refresh button" but didn't state what code that runs.

        It doesn't sound as though you are worried about being offline, so a connection to the server is assumed.

        If you're using a DropDownBox Control, can you use the .refreshDropdownBoxChoices() method? This method makes an Ajax Callback to the server to get current data... and can operate on multiple DropDownBox controls.

        Comment


          #5
          Re: Refreshing list data

          thank you for taking the time to reply, I will check that out

          Comment


            #6
            Re: Refreshing list data

            I am using a ADO connection that might be part of the problem. I think the "afterRefreshData" event might be a good solution. I will look into the. Thanks for the reply

            Comment


              #7
              Re: Refreshing list data

              There are two "DropDownBox" controls connected to an remote SQL database via DAO connection. I looked for a method to do this before but couldn't find one. I'll look for the refreshDropdownBoxChoices() method. That's for the replay

              Comment


                #8
                Re: Refreshing list data

                List event afterRefreshData + .refreshDropdownBoxChoices() method + keeping your current data source type should work at just fine

                Comment


                  #9
                  Re: Refreshing list data

                  This is the solution I'm hoping will fix the problem. I already had a "refresh" button on the panel so I updated that code to include the .refreshDropDownListChoices function. In testing it worked without blowing up, so I think when I publish it will resolve the problem.

                  var lObj = {dialog.object}.getControl('VWLIST');
                  if(lObj) {
                  if(lObj.listIsDirty()) {
                  alert('Cannot refresh List because it has unsynchronized edits.');
                  } else {
                  var options = {
                  keepFocusOnCurrentSelection: true,
                  setFocusToValue: '',
                  refreshDependentLists: true,
                  onlyRefreshDependentLists: false
                  };
                  {dialog.object}.refreshListData('VWLIST',options);
                  {dialog.object}.refreshDropdownBoxChoices("RouteDate");
                  {dialog.object}.refreshDropdownBoxChoices("VechRoute");
                  }
                  };

                  var d = new Date();

                  {dialog.Object}.setValue("LAST_REFRESH",d);

                  Comment


                    #10
                    Re: Refreshing list data

                    You're pushing out one too many callbacks. Save them whenever possible. If you're not using any additional options, your code should be...

                    {dialog.object}.refreshDropdownBoxChoices('RouteDate,VechRoute');

                    Comment

                    Working...
                    X