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

Where should I call Resynch()

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

    Where should I call Resynch()

    I'm having trouble synching my form with records that have been modified in a script.

    I have a set with 5 one-to-many links (call them table1, table2, etc.) to the primary table. The form has a tab object. Each tab contains an embedded browse for each one-to-many link.

    What happens is that if a person enters data into table1, I have a field rule event for OnSaveRecord() for table1 such that depending on certain conditions, it will automatically insert a record into table2. This works fine and is not a problem. The data is properly inserted.

    The problem is that the embedded browse for table2 is not updated and the record does not show until the primary table's record pointer is moved and then returned.

    I have tried .Resynch() in several events with no success. Where should I apply Resynch() to get the embedded browse to updated its list correctly?

    Thanks,
    Jose

    #2
    RE: Where should I call Resynch()

    On way you might try would be to put something like this code at the end of the OnSave Event, if your form is called EntryForm and you give the table2 browse an object name (in Form properties) called table2_browse

    f=Obj(":EntryForm")
    if is_object(f) then
    br=f:table2_browse.this
    br.resynch()

    which should resynch the browse. Sometimes, however, bringing all browses in a form up to synch (without moving the record pointer) can be a pain.

    Finian
    Finian

    Comment


      #3
      RE: Where should I call Resynch()

      Tried your suggestion with no luck.

      An interesting thing is that if after the record is inserted into table2, then I click on the tab for table2 and move to another tab and back, there is no updated, BUT, if I click on the tab for table2, then click in the browse, then click on another tab and back, the browse is updated!?

      Perhaps I need to make the table2_browse the focus and then try to resynch()?

      Comment


        #4
        RE: Where should I call Resynch()

        "Perhaps I need to make the table2_browse the focus and then try to resynch()?"

        I've yet to hit upon a guaranteed method but you can try adding a
        f.resynch()
        to resynch the form and/or a
        br. fetch_first()
        br.activate()
        if that's what you want to do after the record is added.

        Finian
        Finian

        Comment


          #5
          RE: Where should I call Resynch()

          Still no go. I'm wondering if that is the proper way to access the browse functions? The browse is in a tabbed object.

          Shouldn't it be accessed perhaps like this:

          :Form:Tab:Browse.resynch()

          I've tried the line above but it doesn't work. Is there a specific way to access the browse on a tabbed object?

          I know I can resynch the records if I wasn't using a tabbed object. There must be something about a tab that requires a different expression or requires the update to occur in a different event?

          Thanks,
          Jose

          Comment


            #6
            RE: Where should I call Resynch()

            Jose, I think you need to address the particular tab page upon which the browse is located... and I think maybe you need to refresh() the browse instead of resynch the form...

            something like this for the third tab page:

            :Formname:tabbed3:Browse3.refresh()

            You can check the name of the third page in your tabbed subform in design mode for the form. You can check the name of the browse object on the third page in your tabbed subform the same way.

            This would have to modified for the names of the other tabbed pages and browse objects, of course.

            -- tom

            Comment


              #7
              RE: Where should I call Resynch()

              Have you checked the properties of the browse as an object on the form? A5 will give it a sequential browse1 or browse2 by default. I usually change these names to something more meaningful. Then I can address the object without any reference to the tabbed form.

              Finian
              Finian

              Comment


                #8
                RE: Where should I call Resynch()

                Tried renaming the browse in properties with no go. Tried Tom's suggestion too with no go.

                Comment


                  #9
                  RE: Where should I call Resynch()

                  I have a form that sounds quite similar. To refer to browses on tabbed pages, I simply use the :formname:browsename method, ignoring any reference to the tabbed object entirely. If you are trying to cause a refresh to occur live, while you are viewing the browse, this can be extremely tricky. I don't try to do that anymore because of the difficulty of it. However, when I select the tab after the browse table has been updated, it does reflect the changed data.

                  Tom Lyon

                  Comment


                    #10
                    RE: Where should I call Resynch()

                    I have wresteled with this phenomenon for the past year to no avail - with the following exception:

                    tom Cone, when I was a first day neophyte, took me under his wing for a while and helped me immeasureably. one of his golden rules is "don't add records to a child table from the embedded browse" - always use a separate form - which tom and i called the childaddrecordform and/or the childeditrecordform in our emails.

                    Now what I have discovered is this - if, when you add a record to the child, change data on the record, and do so with a separate form, CLOSE THE PARENT FORM when you load the childaddeditrecordform and reopen it when you finish, using a global variable to keep track of the customer number and at the onactivate event of the main form if that variable is greater than one or whatever fetch that record. MOST OF THE TIME this works, although I sometimes have to say :browse1.fetch_first().

                    I don't know if this will help you - but this is the general way I go about it - hopefully version 5 will address this issue as i have seen many messages pertaining to it.

                    if you want more specifics or code examples email or reply.

                    Martin
                    Cole Custom Programming - Terrell, Texas
                    972 524 8714
                    [email protected]

                    ____________________
                    "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                    Comment


                      #11
                      RE: Where should I call Resynch()

                      Instead of a resynch() try using
                      sys_send_keys("{F5}")

                      Comment

                      Working...
                      X