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

Refresh Embedded Browse

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

    Refresh Embedded Browse

    I have a form with numerous field and an embedded browse. When opening the form, I have set the order expression to the <date> field of the table and it shows the most recent entry first in the embedded browse (3/20,3/19,3/18 etc...) If a user presses a button "new", the last line of the browse is highlighted, the user enters there data in the form presses save, the browse shows the new data but it is at the bottom of the browse, regardless of date. I then have to double click the date column of the browse to re-sort by date. What I would like to see happen, is when the user presses the save button, the browse is automatically sorted and displayed as it was originally when the form was first opened, by date (3/20,3/19....)

    #2
    Re: Refresh Embedded Browse

    From what you have described, you are building this form on a set where the browse is a child table.

    If so, then use the definition of the set to set the order of the browse records.

    If the browse is based on the parent table, then build an index for the order desired and set the index in the oninit event.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.
    "Make it as simple as possible, but not simpler."
    Albert Einstein

    http://www.iadn.com/images/media/iadn_member.png

    Comment


      #3
      Re: Refresh Embedded Browse

      Al, thanks for the quick reply. My browse is based on the parent table. I have no set involved. As a newbie, can you give my some help on indexing. Will this solve the issue of my previous post?

      Comment


        #4
        Re: Refresh Embedded Browse

        Al, I created an index (dateorder) in the forms table, and placed the following code in the onInit event: parentform.index_set("DateOrder"), and I see no difference on how the browse records are displayed AFTER saving a new record in the form. I have the form when opened, displaying the records in descending date order.

        DATE CUSTOMER NAME CITY STATE
        3/20 George Bush Houston TX
        3/19 John Doe New York NY
        3/15 Ann Smith Miami FL

        Currently: if the user enters a NEW record dated 3/17, the new record is displayed at the end of the browse, until the "DATE" column is double click, at which time, the DATE order is ascending or descending based on the number of times you click DATE...

        What I would like to accomplish: user enters "NEW" record, when the save button on the form is pressed, the record is automatically placed in descending date order without having to double click "DATE" column

        DATE CUSTOMER NAME CITY STATE
        3/20 George Bush Houston TX
        3/19 John Doe New York NY
        3/17 Albert Einstein Orlando FL
        3/15 Ann Smith Miami FL

        Comment


          #5
          Re: Refresh Embedded Browse

          Jon, here's an example that uses the OnSave event of the browse object to refresh the display of the form at parent level. Seems to meet your requirements. Hope it helps.

          --tom

          Comment


            #6
            Re: Refresh Embedded Browse

            Tom, I appreciate your example and simple solution. How do I get the same result if a user presses the cancel button either in the toolbar or a custom 'cancel' button on the form.

            Comment


              #7
              Re: Refresh Embedded Browse

              Tom,
              I could not get your example to resort the records with the OnSave so that the browse records end up in invert(tx_date) order with the first record showing the newly added record.

              Jon,
              In the attached example starting from Tom's, I added a button that uses a quick sort after the save step to resort the browse. See if that works for you.

              I know that entering records through a browse seems easy and available, but I never do it. I always use an xdialog box to collect the information and write that information directly to the table through variables, and then engage any sorts and refreshes after that. It may not be your "cup of tea" but i put an example on the "new" button if you might like it.
              Mike W
              __________________________
              "I rebel in at least small things to express to the world that I have not completely surrendered"

              Comment


                #8
                Re: Refresh Embedded Browse

                Mike, there's an ordering statement in the set design. My testing was done by entering a variety of new records and the browse correctly places them in proper sort sequence. I don't recall testing the upper or lower bounds. My tests were dates that fell in between existing records.

                Comment


                  #9
                  Re: Refresh Embedded Browse

                  Tom,
                  Isn't the set ordering/filtering analogous to having a base filter / order on a form?? I rarely have seen users do this and have yet to see a need for having such a filter myself, but it sure seems to be a very limiting way of filtering / ordering. I guess my main question is whether such a filter / order behaves like the base filter of a form....and what is the order of precedence ? Can a simple query override this set based filter (would not think so)?
                  Mike
                  __________________________________________
                  It is only when we forget all our learning that we begin to know.
                  It's not what you look at that matters, it's what you see.
                  Henry David Thoreau
                  __________________________________________



                  Comment


                    #10
                    Re: Refresh Embedded Browse

                    Mike & Tom, thanks for you input(s). I have attached a very simple example of the database I'm making. What I want to accomplish at this point is: I would like if the user presses the 'new' button on the form and for one reason or another decides to cancel what they are doing, when they press the 'cancel' button, the browse goes back to the top of the browse and shows the most recent date first (3/1, 2/28...etc). Right know if the user presses the 'cancel' button in the middle of inputting a new record, the bottom of the browse data is shown, the the user has to double click the date column of the browse to re-sort the browse in a ascending or a descending order. Thank you in advance...

                    Comment


                      #11
                      Re: Refresh Embedded Browse

                      ....Right know if the user presses the 'cancel' button in the middle of inputting a new record, the bottom of the browse data is shown, the the user has to double click the date column of the browse to re-sort the browse in a ascending or a descending order. Thank you in advance...

                      Not in my hands! The browse remains sorted throughout the entry process and the pressing of the Cancel button simply cancels the entry process and the Browse continues to be sorted appropriately.
                      Mike W
                      __________________________
                      "I rebel in at least small things to express to the world that I have not completely surrendered"

                      Comment


                        #12
                        Re: Refresh Embedded Browse

                        Mike, I may have misspoken, my apologizes... I agree when the user presses the 'cancel' button during the entry process, the browse remains sorted appropriately. What I want the browse to display when the 'cancel' button is pressed is the top of the browse records NOT bottom of the browse records based on descending date.

                        FOR EXAMPLE: If the user has 100 records in the browse and wants to add another (101), then during entry process presses the 'cancel' button, I would simply like the browse to refresh and display the 1st record, 2nd record, 3rd record etc (again based on descending dates) just like it is displayed when the form is first opened. Right know to accomplish this, the user has to double click the 'date' column and has the choice of viewing the records either ascending or descending (based of the date).

                        Comment


                          #13
                          Re: Refresh Embedded Browse

                          Jon,
                          Rather that have the "Refresh Display" in the action scripting on the Cancel button, you can just issue a fetch first record for the embedded browse. This will select the first record in the browse in the current sort order when the Cancel button is pressed.
                          Ernie

                          Comment


                            #14
                            Re: Refresh Embedded Browse

                            Ernie, thanks for the input. What the possibly of you adding the fetch first record to the cancel button in example3 database I previously provided. Sorry... just learning xbasic... Thank you in advance.. Jon

                            Comment


                              #15
                              Re: Refresh Embedded Browse

                              Jon,
                              Here is the Action Scripting for the Cancel button. This action script is under Record Navigation. You can then select Parent Record or Embedded Browse. I just selected embedded browse, although I'm really not sure if it makes any difference.
                              Ernie

                              Comment

                              Working...
                              X