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

Lists with parent lists and pre-loaded data

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

    Lists with parent lists and pre-loaded data

    Here is an interesting dilemma (or at least for me ;-) )...

    Background:

    I have a three lists in a UX: "Parent_List", "Child_1" and "Child_2". I am indicating that "Child_1" and "Child_2" each have a parent list: "Parent_List" and that the data for each should be pre-loaded (since this application is being designed to work offline - browser based, not mobile). The "Parent_List" is also configured to persist data to local storage (and the restore list data from local storage option is turned on in the UX properties). In order to refresh the data in the "Parent_List", I have the search part turned on in the list (with a text box control and button the UX to execute the server side search). Finally, I have a static text control in the UX with a "record counter" for "Parent_List"

    Dilemma:

    Executing the search on "Parent_List" sometimes refreshes the the list and sometimes does not. For example, if I search for id # 100, it will bring up results in "Parent_List", but if I search for id # 200, it will not update "Parent_List". My suspicion was that the child lists have too much data and the search is "crapping out". That being said, the static text control containing the record counter for "Parent_List" IS updating with the new record count.

    Hopefully this makes sense. Happy to elaborate as needed.
    Last edited by Scott B; 04-20-2019, 01:04 PM. Reason: typo

    #2
    Re: Lists with parent lists and pre-loaded data

    What Alpha build are you using? How many records... and how large are they... in the child lists? IOW, how many MB of local data are you working with?
    It's arbitrary, but figure on about 5mb of local storage. It depends on the browser.
    When you start seeing issues, check on your local storage.

    Comment


      #3
      Re: Lists with parent lists and pre-loaded data

      Thanks David. Version is 5152-5221; number of records could vary greatly from a few dozen to hundreds.
      Last edited by Scott B; 04-20-2019, 03:27 PM. Reason: removed partial text

      Comment


        #4
        Re: Lists with parent lists and pre-loaded data

        Both Child Lists have the same Parent List?
        Are you seeing any errors in the browser console?
        Does this happen at any time? Right after render... or after several searches?
        If you don't pre-load the child data... any issues?
        I think your build 5221-5152.

        Comment


          #5
          Re: Lists with parent lists and pre-loaded data

          Both Child Lists have the same Parent List? Yes
          Are you seeing any errors in the browser console? In Chrome: a5-52215152.js:232 [Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080
          Does this happen at any time? Right after render... or after several searches? It happens only when I'm doing a search on the parent list which has > 500 records or so (and consequently, a greater number of records in the child lists)
          If you don't pre-load the child data... any issues? No issues if I don't pre-load the child data
          I think your build 5221-5152. ?

          Comment


            #6
            Re: Lists with parent lists and pre-loaded data

            In a current release, I'm loading 700 parent records and 800 records each for 2 Child Lists. I'm not seeing any odd results.
            I would suggest you test this in a current release... just to ensure that your build isn't the cause.

            Comment


              #7
              Re: Lists with parent lists and pre-loaded data

              Are you testing this on a mobile device?

              Comment


                #8
                Re: Lists with parent lists and pre-loaded data

                Scott, If I may make a suggestion - eliminate the child lists altogether and perform the same filtering with a server side refresh. My guess is that it will work as expected.
                If it does work, you can add back in one child list and test. You may need to refresh the parent and the child to get the correct filtering.
                Data being "pre-loaded" doesn't mean it works offline as far as I can recall, it just means that the original call for the data will include the child list data which is probably why the "filter" is failing on the second go round.
                Someone will correct me if I am wrong, but no worries, I enjoy learning too!
                NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

                Comment


                  #9
                  Re: Lists with parent lists and pre-loaded data

                  Yes... testing is on a mobile device... that's the only time you get those Console errors.

                  I just tested under 5221 and nothing odd showing up. There must be something else going on with your UX and setup that's causing an error or running into an Alpha bug.

                  Maybe you're running out of LocalStorage space. You said your issue occurs when you've loaded 500 or more Parent records... and many more Child Records x 2. But, you've not indicated how large those records are.

                  Have a look at this site which gives you a simple Javascript function to call which will calc LocalStorage used and remaining. Remember that LocalStorage is volatile... it doesn't belong only to what you're doing. If something else needs it, it will wipe out your data.

                  https://coderwall.com/p/4rsq1w/check...-storage-usage
                  Last edited by Davidk; 04-21-2019, 01:24 PM.

                  Comment


                    #10
                    Re: Lists with parent lists and pre-loaded data

                    Originally posted by CharlesParker View Post
                    Scott, If I may make a suggestion - eliminate the child lists altogether and perform the same filtering with a server side refresh. My guess is that it will work as expected.
                    If it does work, you can add back in one child list and test. You may need to refresh the parent and the child to get the correct filtering.
                    Data being "pre-loaded" doesn't mean it works offline as far as I can recall, it just means that the original call for the data will include the child list data which is probably why the "filter" is failing on the second go round.
                    Someone will correct me if I am wrong, but no worries, I enjoy learning too!
                    I'm not sure about this, Charles. The "Pre-load data" property does state that "this option is typically used when you are loading data so that the UX can be used while disconnected".

                    If all Parent records are being loaded, then all Child records will be loaded as well... so everything should be available offline.

                    Comment


                      #11
                      Re: Lists with parent lists and pre-loaded data

                      My understanding of what the "Pre-load data" option does is to set up the lists where it is really only the parent list that "stores" all the data for the parent and child(ren) lists.
                      If you don't pre-render the UX and delay render for the parent list, open the app, and then take a look at the 3 lists' "_data", I do not believe you'll see any data in any of the lists.

                      In the console (paste in the whole block of code into the console window):
                      Code:
                      var parentListData = DLG1_DlgObj.getControl('listParent')._data;
                      var Child1ListData = DLG1_DlgObj.getControl('listChild1')._data;
                      var Child2ListData = DLG1_DlgObj.getControl('listChild2')._data;
                      table(parentListData);
                      table(Child1ListData);
                      table(Child2ListData);
                      Once you explicitly call for the parent list to be refreshed, then you'll see the parent list with all the data (ie. the actual data for the parent rows and the data for the child lists included in that data).
                      Run the above block of code again.
                      You may see data in the children lists if a row in the parent list is selected but the data you see in those children lists will only contain the "filtered" child data of the selected parent row.
                      I'm not sure if I'm being clear but if you check the "pre-load data" option, the children lists will not really "independently" contain any data and while offline, you will only see child data of a parent if its parent was loaded before going offline.

                      You can also look at the Application tab in Chrome DevTools and then at Storage > Local Storage > file:// .....
                      I believe that you should only see a key being stored for the parent list and no additional keys for the children lists. You'll see the child data stored in the parent list data there also.
                      You can also look in the Chrome DevTools Network tab and see that when you refresh the parent list data that you'll see the child data "pre-loaded" under each of the parent rows. (click on the network call and then read the "response" data)

                      I usually don't mix the Search functionality with offline apps; I'll always rely on client-side filtering. I am wondering if there isn't some sort of bug in that version where, during a search that requires a call to the server and where you receive new data for some "new" parent rows that were not part of the initial "pre-loaded data" load, that the child data of the any new parent row is not included in the search response and that that causes some unexpected exception.

                      I've also seen, in older versions, where this:
                      Code:
                      parent list
                                -> child list 1
                                          -> child list 2
                      is more stable* than when the children lists are "siblings":
                      Code:
                      parent list
                                -> child list 1
                                -> child list 2
                      *more stable in terms of some list methods not working as expected. In older versions I know of at least the following list object's method not working well in the "sibling" case under some conditions: .updateTableRow and .addTableRowsBulk. I wouldn't doubt if other methods do not work as expected either in those cases.

                      Comment

                      Working...
                      X