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

Embedded browse is displaying same record multiple times

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

    Embedded browse is displaying same record multiple times

    I have a form with an embedded browse based on a set like this:
    Code:
    Members
              |
               ======Transactions
    What's happening is when I filter the browse, I end up getting multiple displays of the same record. See my picture.
    If I take off the filter, things display fine again.
    I mostly need the transactions to be displayed in the date order, so I placed an order expression on the set structure, and that works when I enter new records, but as soon as I place a filter on the transaction table, it displays funny.
    The strange thing is, if I select to order of the transaction date in DESCENDING order, I have no problem. If I pick ASCENDING order, I have problems again.

    Any Ideas? Is it clear as mud?
    Brad Steinfeldt

    #2
    I've attached the database for anyone who wants to see what's happening.
    A guarrenteed way to produce the problem is
    1. Open the "Member with Transactions" Form.
    2. Place focus on the "Trans. Date" field on the browse.
    3. Press the Ascending Sort button on top menu.
    4. Press the Decending Sort button and it sorts fine.

    Another strange thing-- When you mouse click the page down part of the scroll bar, it won't go past the duplicated record. If you select the "one record at a time" button, It moves on to the other records, but until you do that, you can press the page down forever.

    One last thing I've noticed is duplication always occurs on the second record.
    Last edited by acceptthis; 02-03-2006, 03:13 AM.
    Brad Steinfeldt

    Comment


      #3
      Brad,

      I took a look. Using the default form for your set I cannot cause the error you're seeing to occur. In your custom form you are applying several different filters at the same time. Parent records are included only if there are matching child table records. The set linkage definition sorts the transaction table records in ascending order based on the transaction date. Then you click the quick sort buttons to add another filter layer on top of the previous. Your browse also is trying to display 3 separate calc field columns that must be computed and recomputed for each row in the child table. These calcs have to be re-run each time you change the sort order using quick sort tools because one of the calc fields includes running totals for each line in the browse. I saw the behavior you report (in case you're seeking confirmation), but I think this may be a situation where the calc fields (especially the one using the report function run_total() ) is triggering the fault. Frankly, I think Alpha is repainting the browse before all the required calculations are completed. If you delete all the calc field columns and then delete the calc fields definitions the browse behaves correctly. In short, I think you've designed something here that Alpha Five can't handle. In part this may be because the running total function was designed for report layouts, not forms. I'll continue watching this thread in case others have more hopeful ideas for you.

      -- tom

      Comment


        #4
        Tom,
        Thanks for finding the cause of my problem.
        I removed the calc->rtotal from the browse like you suggested
        calc fields (especially the one using the report function run_total() ) is triggering the fault.
        and no more problems.
        I don't really need calc->rtotal, it just gives the browse more of an "account register" feel to it.
        It actually doesn't work right anyway when there's a filter on the browse because it's only running the total for the few records that are filtered. That doesn't match the balance anyway.
        Maybe, if there's a way to blank out the calculation of rtotal when the child table is filtered, and it only shows up when the full scope of transactions are displayed?
        I don't know if that's worth the trouble for just "browse eye candy".
        I guess I could just put buttons for printing reports if seeing the running total is important, because it works fine in reports.
        Thanks again, and if there are any other ideas out there, let me know.
        Brad Steinfeldt

        Comment


          #5
          acceptthis -
          how do you create a filter for a browse?

          Comment


            #6
            filtering an embedded browse

            I don't know if this is what you're after, but I think it is. If you understand xbasic, I was pointed to this code to solve the problem:
            Code:
            rec = parentform:tables:prospect.recno()  	'get record number of current customer
            				  	'will use to return to same customer 
            				   	'after running query that would otherwise
            				   	'shift focus to first Customer in table
            
            ' in this example, I'm filtering my TODO_TYPE field by "timeless"								
            parentform:tables:prospect.filter_expression = "TODO_TYPE=\"Timeless\""  'define filter expression
                                                           'fieldname is all that's needed.  Notice the quote marks.
            parentform:Tables:prospect.query.order = "SCH_DATE"                                            
            parentform:tables:prospect.query() 		'run query against the Tasks table
                                            		    'this uses the filter expression, previously defined
            xbasic_wait_for_idle()           		'pause script while query completes running
            parentform:tables:prospect.fetch_goto(rec)  'shift focus to the Customer record that
            											'had focus before query ran
            parentform.resynch()  					'resynch the form
            parentform:prospect.fetch_first()		'move to top row in the browse
            I also found information on this in the documentation, but I don't know how to find it again. I just copied and pasted it from one of my scripts.
            Brad Steinfeldt

            Comment


              #7
              search?

              Originally posted by acceptthis
              I also found information on this in the documentation, but I don't know how to find it again.
              Open the webhelp, type something definitive in the words to search for box (I used fetch_goto(rec)).

              Immediately was taken to Querying and Sorting Child Tables on a Form
              There can be only one.

              Comment


                #8
                Thanks for the help, guys. So there is no 'genie' that can filter a browse? You would think that functionality would be an obvious feature to have within the Script Actions to complete without having to use code.

                I actually had that page open in the help file when you posted your reply. I'm trying to filter a browse based upon a combobox value. I'm not a programmer or DB person so this last piece of my project is taking some time to complete....

                I'll try modifying that code to use a combobox value.

                fyi - here is my current database - http://www.macwellness.net/data/db.zip
                Last edited by first5.0; 02-24-2006, 11:21 AM.

                Comment


                  #9
                  Bryan
                  For Filter read Query
                  Try using the Query Genie - accisible from the Query Menu
                  Colin

                  Comment


                    #10
                    Colin -
                    Using that method will cause the Query Genie to open when the user clicks on a different Member, correct?

                    I want the user to be able to pick a member from a list and have the browse update automatically. (The browse shows all Referrals that are linked to that member.)

                    Comment


                      #11
                      Bryan,

                      Not clear on your context.

                      If your form is based on a one to many set, the embedded browse for linked child table records will show all the linked records for the current parent table record. If you navigate to the next parent table record the embedded browse will automatically filter the child table to show only those records which are linked to the new parent.

                      If you want to limit the range of child table records being displayed for each parent record you simply need to define a filter for the child table. This is easily done using the properties of the form. Open the form in design mode, Choose Form menu, then Properties. Then click the Filter/Order tab and choose your child table. Very simple. A genie will help you build the filter expression if you wish.

                      -- tom

                      Comment


                        #12
                        Sorry for the confusion. I'm not sure how to use AlphaFive correctly so I don't know how to convey my problem using the correct terminology.

                        I have a member table which holds member info and a referral table which has all referrals (a referral is when an employee refers a member to a program). I created a set based on the referral table.

                        I'm now thinking that I need to make a set based upon the Member table which links to the referral table.

                        That could be my whole problem....

                        Yeah, that was it.

                        I feel like an idiot. I made a simple task turn into a nightmare. Thanks for your help guys! Sorry for being a complete noob!
                        Last edited by first5.0; 02-24-2006, 12:48 PM.

                        Comment

                        Working...
                        X