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 Embedded Browse after an Append operation

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

    Refreshing Embedded Browse after an Append operation

    Help please. I have either forgotten or never knew this in the first place.

    I have a Set which has a Header, Detail and a Stack (Stack recording changes over time)

    In the Detail section, a Field can be updated which will be Appended to the Stack.

    I cannot get the Form to refresh and pick up all of the new data following the Append unless I close the form and reopen it.
    I have tried resynch(), refresh, repaint etc. and cannot get it to work.
    I know that the set and form logic is correct as a close and open gives me exactly what I need to see.

    As always, any help much appreciated.
    See our Hybrid Option here;
    https://hybridapps.example-software.com/


    Apologies to anyone I haven't managed to upset yet.
    You are held in a queue and I will get to you soon.

    #2
    Re: Refreshing Embedded Browse after an Append operation

    parentform.resynch()

    should do it. Unclear what you tried.
    There can be only one.

    Comment


      #3
      Re: Refreshing Embedded Browse after an Append operation

      Hi, Ted.

      Have I missed something? What's a "Stack" ?

      Other questions occur to me, ignore them all if Stan's idea works for you.

      1) how are you doing the "append"? Is there any reason you can't do it through the form, using a form based script to manipulate the "Stack" control?

      2) In the detail section is the "update" you mention the entry of a new record, or is it saving a change to an existing record?

      -- tom

      Comment


        #4
        Re: Refreshing Embedded Browse after an Append operation

        parentform.resynch() has no effect.
        The Stack is my name for a table with a record of changes over time,

        01/01/1900 Paid
        01/02/1900 Not Paid
        Etc.

        The script is attached to the form.
        When it runs, it saves the record, appends the data from the columns on the browse to the stack.
        The old value and new value which are side by side need to be updated, so I thought a parentform.resynch() would work.
        Closing the form and opening it however does the job or refreshing the browse content.
        I cannot easily close and open but that is another option.
        See our Hybrid Option here;
        https://hybridapps.example-software.com/


        Apologies to anyone I haven't managed to upset yet.
        You are held in a queue and I will get to you soon.

        Comment


          #5
          Re: Refreshing Embedded Browse after an Append operation

          Ted, I'd need to see a sample of the form, with representative data.

          What's the set structure look like supporting the form? In particular how is the stack table linked into the set?

          What kind of control is used to display rows from the Stack?

          If the Stack table is not part of the set supporting the form a resynch of the form will not update its display if, for example, you're using a listbox or some other control.

          Comment


            #6
            Re: Refreshing Embedded Browse after an Append operation

            See attached, Tom.
            Attached Files
            See our Hybrid Option here;
            https://hybridapps.example-software.com/


            Apologies to anyone I haven't managed to upset yet.
            You are held in a queue and I will get to you soon.

            Comment


              #7
              Re: Refreshing Embedded Browse after an Append operation

              Ted,

              I used this combination
              'Refresh form
              parentform.Commit()
              parentform.resynch()
              parentform.Refresh_Layout()
              parentform.browse1.activate()
              parentform.BROWSE1.Resynch()
              parentform.BROWSE1.Refresh_Layout()
              parentform.browse1.show_all() ' I think this is a key
              parentform.browse1.fetch_first()

              Comment


                #8
                Re: Refreshing Embedded Browse after an Append operation

                Hey John, I will try this tomorrow and report back.
                Thanks.
                See our Hybrid Option here;
                https://hybridapps.example-software.com/


                Apologies to anyone I haven't managed to upset yet.
                You are held in a queue and I will get to you soon.

                Comment


                  #9
                  Re: Refreshing Embedded Browse after an Append operation

                  Ted, I struggled with the same thing recently, only the form was based on a table and not on a set.

                  The embedded browse would not resynch after I ran an append.

                  What worked for me was putting the following 'Action Scripting' on the same button that ran the Append script.

                  After running the append script

                  - Activate an Object (the Object being the Embedded Browse)
                  - Goto Last record (last record in browse)

                  This would cause the embedded Browse to show the appended records.
                  Last edited by Vince McGinnis; 01-29-2014, 07:33 PM.

                  Comment


                    #10
                    Re: Refreshing Embedded Browse after an Append operation

                    No luck Vince. Thanks anyway.
                    Now to try Johns method
                    Nope. That doesn't work for me either.
                    I will keep trying and probably end up posting an example.
                    Last edited by Ted Giles; 01-30-2014, 12:30 PM.
                    See our Hybrid Option here;
                    https://hybridapps.example-software.com/


                    Apologies to anyone I haven't managed to upset yet.
                    You are held in a queue and I will get to you soon.

                    Comment


                      #11
                      Re: Refreshing Embedded Browse after an Append operation

                      3..4..5 maybe 10 years ago ..I don't remember..but back then I posted a simple solution for your dilemma.
                      Where were you 10 years ago?

                      No need to close and reopen the form.
                      Run a query on the set using as a filter ".t." or whatever it is you want to show. It will show your last entry(s).
                      That was one way to do it that I could remember, but I posted other solutions as well. I don't remember the rest right now..have to go back and pull up that thread.

                      Comment


                        #12
                        Re: Refreshing Embedded Browse after an Append operation

                        I think Gabe has the right idea.

                        Ted, here is the method that always works for me 110% of the time:

                        Code:
                        PARENTFORM:tables:Transactions.filter_expression = "Division = 'H' .AND. Between(Status,'1','3')"
                        PARENTFORM:tables:Transactions.order_expression = "Status + Invert(Projchar)"
                        PARENTFORM:tables:Transactions.query()
                        
                        idx = PARENTFORM:tables:Transactions.index_primary_get()
                        nrecs = idx.records_get()
                        or

                        Code:
                        this:tables:statement_hdr.filter_expression = ""
                        this:tables:statement_hdr.order_expression = "Invert(Stmt_Id)"
                        this:tables:statement_hdr.query()
                        
                        idx = this:tables:statement_hdr.index_primary_get()
                        nrecs = idx.records_get()
                        or

                        Code:
                        f = form.view()
                        
                        f:tables:Transactions.filter_expression = "Division = 'H' .AND. Between(Status,'1','3')"
                        f:tables:Transactions.order_expression = "Status + Invert(Projchar)"
                        f:tables:Transactions.query()
                        
                        idx = this:tables:Transactions.index_primary_get()
                        nrecs = idx.records_get()
                        Last edited by Peter.Greulich; 01-31-2014, 11:54 AM.
                        Peter
                        AlphaBase Solutions, LLC

                        [email protected]
                        https://www.alphabasesolutions.com


                        Comment


                          #13
                          Re: Refreshing Embedded Browse after an Append operation

                          Not tried it yet Peter, but thanks to you and G for the suggestions/fix.
                          See our Hybrid Option here;
                          https://hybridapps.example-software.com/


                          Apologies to anyone I haven't managed to upset yet.
                          You are held in a queue and I will get to you soon.

                          Comment


                            #14
                            Re: Refreshing Embedded Browse after an Append operation

                            Tried both Peter and G's solutions and I am obviously missing something.
                            A query gives me a browse with no data visible. All records are there, but not visible.
                            I'll post an example next, as it is driving me nuts!
                            (As well as the installer "additional files" which I will put in a new thread)
                            See our Hybrid Option here;
                            https://hybridapps.example-software.com/


                            Apologies to anyone I haven't managed to upset yet.
                            You are held in a queue and I will get to you soon.

                            Comment


                              #15
                              Re: Refreshing Embedded Browse after an Append operation

                              Ted,

                              Maybe your appending and my appending is not same case but I had same problem and solved it with this comment
                              from xBasic Everyone book
                              ...
                              In this script we run 2 sequential queries on the tables, and then explicitly synchronize the form to the
                              underlying tables with the resynch() method. We use the show_all() method to allow the user to navigate
                              freely on the form, which is finally displayed with show() and activate().
                              Contrast the use of query_create() with query() and viewQueried(). All....

                              Comment

                              Working...
                              X