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

Browse Display - Selected Record Changes Row Postion

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

    Browse Display - Selected Record Changes Row Postion

    I have a embedded browse on a form that resyncs the form in an ontimer every 30 seconds to see changes to the data in the browse (many network users changing a small amount of data frequently).

    The anoying thing is, say there are 15 records in the browse and I can see them all but I have record #10 in the browse selected, as soon at the resync and refresh commands are called, the record I am on, in this case record #10 moves to the first position in the browse with the remaining 5 thereafter and deadspace following it, even though all 15 records fit nicely in the browse.

    It would be really nice to resync and refresh and have the browse exactly as it was. Would there be a way to figure out what is the first record in the browse and the position in the browse of the record selected and freeze the ui, do the resync, set the browse up in the exact same way and unfreeze the ui?. I have been toying with this without success and know there must be a way. Thanks.

    #2
    Re: Browse Display - Selected Record Changes Row Postion

    In the OnTimer event have you tried getting the recno() in the browse first and then doing a fetch_goto to move back to that record? Or is that what is resynching your record to the top of the browse? Maybe a fetch_first and then a fetch_goto? Just as an aside, why not just let the user do a refresh whenever they want to see if the data has updated instead of trying to make it automatic? On the other hand seeing the browse move would at least notify the user that new records have been added...I suppose you have to be there ;)
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

    Comment


      #3
      Re: Browse Display - Selected Record Changes Row Postion

      I have never tried the fetch goto. I assumed it would put that record first in the browse. I will try that in the am. The app is a live service scheduling for aircraft with many users entering requests and completed items. The schedule board has to be updated all the time.

      Comment


        #4
        Re: Browse Display - Selected Record Changes Row Postion

        How do you use the fetch_goto in this instance, I tried

        cr=browse1.Current_Record()
        browse1.fetch_first()
        browse1.fetch_goto(var->cr)

        It is not to be used in this way. I do not want to step through each record line as it is painfully slow, any ideas to get to the record?

        Comment


          #5
          Re: Browse Display - Selected Record Changes Row Postion

          My bad - it is a table function...which still might work.
          Robin

          Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

          Comment


            #6
            Re: Browse Display - Selected Record Changes Row Postion

            I actually tried it and it throws an error. There must be a way to move to a record_number in an embedded browse, I just do not know how to.

            Comment


              #7
              Re: Browse Display - Selected Record Changes Row Postion

              Any chance you could post a sample here we could experiment with ?

              Comment


                #8
                Re: Browse Display - Selected Record Changes Row Postion

                Originally posted by johngtatp View Post
                How do you use the fetch_goto in this instance, I tried

                cr=browse1.Current_Record()
                browse1.fetch_first()
                browse1.fetch_goto(var->cr)

                It is not to be used in this way. I do not want to step through each record line as it is painfully slow, any ideas to get to the record?
                I would try (not sure of the speed)

                cr=browse1.get_Viewport_Row()
                browse1.fetch_first()
                for qx = 1 to cr-1
                browse1.fetch_next()
                next
                There can be only one.

                Comment


                  #9
                  Re: Browse Display - Selected Record Changes Row Postion

                  Thanks Stan for that. I looked in the documentation and I could not find get_Viewport_Row(), but I did give it a try. The form I am using has a fairly large set and many color calculated fields in the browse and it takes a second to step through each browse record, I was hoping there was a direct way to put focus on the record, especially if you have the recno(). I will try to cut this down for an example. This app has been in use for a year and has a ton of day and it is not easy to make this into a clean example.

                  All of this stems from my need to update this page every 30 seconds with changes (resync and refresh). It is a scheduling board which shows all of our incoming flights for a day. If you are on a record near the bottom of the list and the update occurs, the record you were focused on goes to the top of the browse leaving all the others out of view. On the overhead monitor display I just add a fetch_first, but on a person who is editing using this screen (they access all the records frequently) it removes from view any of the earlier flights and they have to then press a button to return to see all the flights again. It is just a clunky method. I used to have the network refresh timer set and I was trying to put in in the ontimer event for the form as I dont need the update if they are not on that form. Thanks again for trying and I will try to carve out a sample.

                  Comment


                    #10
                    Re: Browse Display - Selected Record Changes Row Postion

                    Stan got me thinking with Get_Viewport_Row()
                    try
                    Code:
                    cr = Browse1.Get_Viewport_Row()
                    
                    'your resynching code
                    
                    Browse1.Scroll_Current_Row(cr)
                    http://wiki.alphasoftware.com/New+Br...+in+Version+10
                    Tim Kiebert
                    Eagle Creek Citrus
                    A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

                    Comment


                      #11
                      Re: Browse Display - Selected Record Changes Row Postion

                      OMG! Finally it worked! It does the network refresh (resync) and appears to hold the position and view of the screen. I never heard of this command before. I really hope this helps others as there are so many posts about this. I cannot find any reference to the veiwport command anywhere. The code I used was:
                      if topparent.mode_get()="View"
                      cr = Browse1.Get_Viewport_Row()
                      topparent.Resynch()
                      topparent.Refresh_Layout()
                      Browse1.Scroll_Current_Row(cr)
                      else
                      end if

                      Comment


                        #12
                        Re: Browse Display - Selected Record Changes Row Postion

                        Ok, Tim.

                        Inquiring minds want to know. Where is the documentation for the browse methods employed here?

                        browse1.Scroll_Current_Row(cr)

                        and

                        Browse1.Get_Viewport_Row()

                        Thanks.

                        Comment


                          #13
                          Re: Browse Display - Selected Record Changes Row Postion

                          Its gotta be somewhere the Browse Events are discussed, since they are like the ones used in the Title_Click event.
                          Robin

                          Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                          Comment


                            #14
                            Re: Browse Display - Selected Record Changes Row Postion

                            Originally posted by Tom Cone Jr View Post
                            Ok, Tim.

                            Inquiring minds want to know. Where is the documentation for the browse methods employed here?

                            browse1.Scroll_Current_Row(cr)

                            and

                            Browse1.Get_Viewport_Row()

                            Thanks.
                            Sorry Tom, you have to be part of a special club. But you can get access to it for a yearly subscription.

                            EDIT: Ok, so there isn't really a special club. I am just firing up my laptop to find the links. The Scroll_Current_Row() is discussed in the link I placed in post 10. Get_Viewport_Row() I am not sure but I remembered it after Stan suggested it. It also was in one of the 'Whats new' or release notes documents.

                            They don't even show up in the auto complete or in the method list in the xbasic explorer.

                            NOTE: Get_Viewport_Row has a complementary function Set_Viewport_Row()
                            Last edited by Tim Kiebert; 04-17-2013, 06:12 PM.
                            Tim Kiebert
                            Eagle Creek Citrus
                            A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

                            Comment


                              #15
                              Re: Browse Display - Selected Record Changes Row Postion

                              It's in the new in V8 here:
                              http://support.alphasoftware.com/wha...atsnewinV8.htm

                              As Tim had posted in an earlier thread

                              Comment

                              Working...
                              X