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

List object appendRows() and insertRows()

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

    List object appendRows() and insertRows()

    Anyone know if the List Object appendRows() and InsertRows() commit the rows to the table? It seems they do not. But I also can't find any followup function to cause that commit.

    I'm using these as I believe appropriate, and I see the list populated without problem. But they don't commit the list rows to the table. Because the list does not have a detail part, standard detail-part save functions aren't the solution.

    All help and videos I can find do not answer this question.

    So how to commit the rows to the table when using these methods?

    Thanks.
    -Steve
    sigpic

    #2
    Re: List object appendRows() and insertRows()

    Is this the same question as in the post started by Lance? You can't use the List control, with a Detail View, to commit records to your back end. Non-DetailView Lists are a one way trip. Add a DetailView and then you can use the appropriate methods. I just posted this in the other thread you posted to. I assume you had a detail view and so spoke that. In this post, you say you don't have a detail view... but you'll need one.

    The methods you're using are for non-DetailView Lists. If you want to add data to a List with a DetailView and have that List sync'd then you'd use the .addTableRow() method. This method is referenced in the posts in this thread and more info can be found here... http://downloads.alphasoftware.com/A...DetailView.htm

    Comment


      #3
      Re: List object appendRows() and insertRows()

      Well, here's the problem. I just spent a couple days (see thread with Sarah's help) figuring out how to push data from a repeating section into a List object. So it appears much of that is not of use here if that data can't be committed to the table.

      But, it seems this would work if I establish dummy fields as the List's detail view, then iterate through the repeating section to populate the dummy fields and save *that* to the List control.

      Do you suppose that would work?

      I was thinking the List control and its disconnected capabilities might save some time here, but I'm beginning to have my doubts that that's the best avenue, maybe just skip it completely and go directly from javascript/JSON to local storage and/or Xbasic for table insert. Pretty crappy to get right to the final step of having the data in the List and discover you can't commit that to the table.

      Edit: Well, I just built that test with dummy fields and a Detail part for the List, and it appears that what I describe above doesn't work either. So, how to get data from a repeating section into a List control?
      Last edited by Steve Workings; 03-26-2016, 01:41 PM.
      -Steve
      sigpic

      Comment


        #4
        Re: List object appendRows() and insertRows()

        It's a matter of understanding the capabilities of the route you choose. I'm not sure you understand the .addTableRow method... and I don't understand what you're trying to accomplish with repeating sections, Lists, and disconnected. Sounds a bit messy to me.

        However, the .addTableRow method does not required the use of DetailView fields. You could go that route if you want, but unnecessary. .addTableRow adds a row to a DetailView List in much the same way of typing data into detail view fields and hitting a save button. But it's direct. The data is added directly to the List without going through fields and you can then sync that List.

        Comment


          #5
          Re: List object appendRows() and insertRows()

          I'm still not seeing this clearly.

          The documentation that you linked here says:

          <listObj>.addTableRow(data [,options]) - Adds a new row of data to a List that has a Detail View.
          but you say:

          the .addTableRow method does not required the use of DetailView fields.
          So do I need a list with a detail view? If so, do I create and map detail view controls? I've tried all combinations that I can think of and have yet to get a single record committed to the table through these methods.

          And, no, what I'm doing is not "messy" but I think a very fine solution to the requirements of this application. All is well except getting the data from a repeating section into a List. And if it simplifies anything, my question doesn't have to even mention repeating section. Put another way: I have data in controls that are not List detail part controls. How can I get that data into a List control and further into the table (or, if disconnected, local storage)?

          Thanks
          Last edited by Steve Workings; 03-26-2016, 02:35 PM.
          -Steve
          sigpic

          Comment


            #6
            Re: List object appendRows() and insertRows()

            You wrote about creating dummy detail view fields and populating them with data. .addTableRow does not require this. As long as a List Control has it's Detail View turned on, you can use .addTableRow to populate the List with data. Have a look at the documentation for .addTableRow, create a simple List with it's Detail View checked (you don't need to create Detail View fields) and then use the example code for .addTableRow.

            Once the data is added to the List you can then sync the List using...

            Code:
            {dialog.object}.saveListEdits('LIST1',{rows: 'allRows'});
            Having added a row or rows to a List using .addTableRow you'll see each row has a blue triangle indicator on it.

            Comment


              #7
              Re: List object appendRows() and insertRows()

              OK, got it all working, thanks for the hand here.
              -Steve
              sigpic

              Comment


                #8
                Re: List object appendRows() and insertRows()

                Steve - can you elaborate on how you got this work? Was it using the .saveListEdits method posted by David? Thanks

                Comment

                Working...
                X