Alpha Video Training
Results 1 to 22 of 22

Thread: Strange Control Browse Issue

  1. #1
    Member
    Real Name
    Melvin
    Join Date
    Nov 2011
    Posts
    133

    Default Strange Control Browse Issue

    My application has a shipping queue that shows the warehouse staff what orders need to be shipped.

    Once the Fedex tracking label is printed the user types in the shipping cost and FedEx tracking number then presses the shipped button.

    The shipped button then adds todays date, saves the record, then refreshes the filtered control browse.

    However when the list of records becomes longer and the user needs to scroll down the browse to find and update a record, after pressing "shipped" the browse selects a different record then continues with the script.

    This same issue of selecting the wrong record also occurs when the user updates the record then clicks on the row selector.

    Here is an example of the issue. I entered in a fake tracking number for Interaction 150768, then clicked on the row selector for the same row. The browse then highlighted Interaction 146537.

    Capture.PNG

    I can't seem to find any reason for this to happen.

    Any ideas?

  2. #2
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,365

    Default Re: Strange Control Browse Issue

    There have been issues with long browse data changes.
    You might be better off having a new form pop up on dblclick from the browse to manage changes.
    Ted Giles
    Example Consulting - UK
    .

    http://ec12.example-software.com//
    See our site for Alpha Support, Conversion and Upgrade.

  3. #3
    Member
    Real Name
    Melvin
    Join Date
    Nov 2011
    Posts
    133

    Default Re: Strange Control Browse Issue

    I think you might be right Ted.

    Thanks for the reply.

  4. #4
    "Certified" Alphaholic MoGrace's Avatar
    Real Name
    Robin
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    3,698

    Default Re: Strange Control Browse Issue

    Hi Melvin,
    It looks like you have enough room on the form above the browse to add a search box. For this many records it might be easier for your users to type in the number they want to find and query the records so only the one record shows for editing. Then on save release the filter with a topparent.show_all() - which is just another idea. Other than that you might check your indexes and/or let us see your script!
    Robin

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

  5. #5
    Member
    Real Name
    Melvin
    Join Date
    Nov 2011
    Posts
    133

    Default Re: Strange Control Browse Issue

    I've noticed that this issue of selecting the wrong record also occurs while making changes to fields directly in the table default browse.

    When I go directly into a table, update a record, then try to select the record directly above it Alpha five automatically jumps to a different record.

    Could this be an Alpha Five issue?

  6. #6
    "Certified" Alphaholic Ray in Capetown's Avatar
    Real Name
    Ray Hendler
    Join Date
    Jan 2009
    Location
    South Africa
    Posts
    2,036

    Default Re: Strange Control Browse Issue

    This is similar to many reported user experiences with interactive browses.
    Its kind of known about (I don't mean acceptable)

    but often manageable if you have the need. Some methods I have used to tame..

    causes could be;
    Certain OnRow... activity and especially event/events if you use them.
    Table or Form wide calculated fields.
    These may scroll the underlying table and not always re-position the browse. Especially when it is a scrollable browse (ie not all rows fit in the frame)

    try some functions including
    Get_Viewport_Row()
    topparent.Resynch()
    Scroll_Current_Row(cr)

    24 May 2013 Raymond Lyons suggested in a post
    "Have you tried <OBJECT>.REFRESH_FIELDS() ? Or <OBJECT>.REFRESH_LAYOUT() with the object being the name of the form?"

  7. #7
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Re: Strange Control Browse Issue

    Melvin,

    which build are you using? They did some work on the browse control in March this year.

  8. #8
    Member
    Real Name
    Melvin
    Join Date
    Nov 2011
    Posts
    133

    Default Re: Strange Control Browse Issue

    Thanks Ray...I'll try some of your suggestions.

    Hi Tom...I'm using V11 Build 3381. I seem to have the latest updates installed.

  9. #9
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Re: Strange Control Browse Issue

    Melvin, I agree, you're using the latest.

    Tell us about the set supporting your form.

    Also, do you see the same behavior in the AlphaSports sample?

    -- tom

  10. #10
    Member
    Real Name
    Melvin
    Join Date
    Nov 2011
    Posts
    133

    Default Re: Strange Control Browse Issue

    Tom

    Yeah...The issue occurs in the AlphaSports sample.

    If I go into the product table, scroll down to Product ID PO78, change the Cost field value, then with my mouse click on the Cost field for Product ID PO77 Alpha jumps to PO51.

    If I then scroll back down to PO78, change the Cost field value again, then with my mouse click on the Cost field for PO79 Alpha jumps to PO105.

    The issue also occurs in the parts section of the Invoice form.

  11. #11
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Re: Strange Control Browse Issue

    Thanks, Melvin,

    I've submitted a formal bug report and will let you know what I hear.

    -- tom

  12. #12
    Member
    Real Name
    Melvin
    Join Date
    Nov 2011
    Posts
    133

    Default Re: Strange Control Browse Issue

    Thanks for your help Tom!

  13. #13
    Member
    Real Name
    gordon stern
    Join Date
    Mar 2006
    Location
    new york
    Posts
    20

    Default Re: Strange Control Browse Issue

    Hi Tom,

    I am also having this problem - and it is causing my employees to make mistakes on data entry if they are not very, very careful. Have you heard anything back from Alpha on this bug?

    Regards,
    Gordon

  14. #14
    Member
    Real Name
    Stan Lisica
    Join Date
    May 2007
    Posts
    8

    Default Re: Strange Control Browse Issue

    My experience -
    Also use the browse for editing data and encountered the same problem with build 3462.
    Could select record to edit but after saving the cursor jumped to another record. So could not edit and save consecutive records.
    Using the up and down arrows (instead of mouse) worked to overcome this problem.
    Reported bug at end of April and reply was that it was corrected BUT I am using the PRE-RELEASE build since then (now 3579) and the problem has gone away.
    Stan

  15. #15
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Re: Strange Control Browse Issue

    Me too. The prerelease build seems to fix this.

  16. #16
    Member
    Real Name
    gordon stern
    Join Date
    Mar 2006
    Location
    new york
    Posts
    20

    Default Re: Strange Control Browse Issue

    Thanks to all. The patch fixed the problem.

  17. #17
    Member
    Real Name
    Melvin
    Join Date
    Nov 2011
    Posts
    133

    Default Re: Strange Control Browse Issue

    Thanks Tom for your follow up.

    Any idea as to when the pre-release will go into production?

  18. #18
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,310

    Default Re: Strange Control Browse Issue

    Nope, sorry.

  19. #19
    "Certified" Alphaholic MoGrace's Avatar
    Real Name
    Robin
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    3,698

    Default Re: Strange Control Browse Issue

    Quote Originally Posted by Ray in Capetown View Post
    This is similar to many reported user experiences with interactive browses.
    Its kind of known about (I don't mean acceptable)

    but often manageable if you have the need. Some methods I have used to tame..

    causes could be;
    Certain OnRow... activity and especially event/events if you use them.
    Table or Form wide calculated fields.
    These may scroll the underlying table and not always re-position the browse. Especially when it is a scrollable browse (ie not all rows fit in the frame)

    try some functions including
    Get_Viewport_Row()
    topparent.Resynch()
    Scroll_Current_Row(cr)

    24 May 2013 Raymond Lyons suggested in a post
    "Have you tried <OBJECT>.REFRESH_FIELDS() ? Or <OBJECT>.REFRESH_LAYOUT() with the object being the name of the form?"
    Hi Ray,
    I found a couple of threads that suggested using get_viewport_row() but the problem with that function is that the row number it gets only relates to the rows currently displayed in the embedded browse. IOW you may have 200 records but only 20 display at a time in the browse and so your row number will be in the range of 1-20. If for example you delete a record using the delete_record() function, it will jump to the end of the browse so that scroll_current_row(var) returns you to the row in THAT current display (ie. row 1 is now 20 records from the bottom) - not the one you were viewing before!

    This works in a button for deleting a record then takes you back to the next record in the original display based on my current index key for the form:

    Code:
    dim gokey as c
    dim curkey as c
    curkey = cdate(txdate.value)+needle.value
    ui_freeze(.t.)
    topparent.fetch_next()
    gokey = cdate(txdate.value)+needle.value
    'used to test
    response = ui_msg_box("Delete Record","Index Key: "+curkey,33)
    if response = 2 then
    	end
    end if
    topparent.fetch_prev()
    topparent.delete_record(.t.)
    ui_freeze(.f.)
    topparent.find(gokey)
    Robin

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

  20. #20
    "Certified" Alphaholic Ray in Capetown's Avatar
    Real Name
    Ray Hendler
    Join Date
    Jan 2009
    Location
    South Africa
    Posts
    2,036

    Default Re: Strange Control Browse Issue

    Yes Robin, I can see how that sequence would keep things tight. Working outside the browse - ie the button is on the parent form.
    Through it, I just discovered another nicety that I hadn't come across, UI_Freeze.
    So if I want a size 36 top there's a high likelihood I'll get one ? (blue is good).

    Could a method like that help in the case of editing directly in a browse where the underlying record (and therefore data) goes out of sync and messes with the current?

  21. #21
    VAR
    Real Name
    Martin W. Cole
    Join Date
    Apr 2000
    Location
    Terrell, Texas (near Dallas)
    Posts
    5,956

    Default Re: Strange Control Browse Issue

    I've had this issue for years, and not just with embedded browses, but also with the parent record in a set for the form. My approach, where the event and script vary according to the circumstance, has been this:

    In the autoexec I define a global variable
    dim global rnum as n=0

    then, where I am committing a record in the form, I say something like this: (which in this case applies only when editing a record)

    dim global rnum as n
    t=table.current()
    rnum=t.recno()
    parentform.commit()
    if t.recno() <> var->rnum
    parentform.index_set("")
    parentform.find(var->rnum)
    end if

    where this goes, and the syntax, varies on the situation, but it has been a satisfactory solution for jumping records.
    Cole Custom Programming - Terrell, Texas
    972 524 8714
    martin_w_cole@msn.com

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

  22. #22
    "Certified" Alphaholic Ray in Capetown's Avatar
    Real Name
    Ray Hendler
    Join Date
    Jan 2009
    Location
    South Africa
    Posts
    2,036

    Default Re: Strange Control Browse Issue

    If the "commit()" changed the record pointer, then "if t.recno() <> var->rnum" it will be returned to the record visible prior, using rnum.

    My fear with browses is that the edit was made in , say browse line 5, the calculation picked up data from browse line1*. Commit would save the record at browse line 5 (with an incorrect value) and then your test would return one to the same browse line, line5. Which it never left in the first place.

    *this is the most common experience I have had, before I avoided form calcs on browse line fields where some or other form calc parsed the browse records.

    The difficulty is then replicating the scenario for publishing here, in so doing the thing works correctly.
    Going back to the live db and trying to eliminate various things, it begins also to work properly. Sometimes for a while. Then seems to stabilize.
    Now since I am still using v10 I can't very well present a case, if I did nail one example down to being replicable.

    Previously, when it has done that, I have done a check for the record number browse to table, it checks always - but still, a field value from a linked child table is returned with a value from a record that the first item in the browse is linked to.

    I appreciate your interest any how, but wouldn't throw any further effort at it unless you have had some similar experience already. I am circumventing this happening with some avoidance tactics.
    Last edited by Ray in Capetown; 06-15-2013 at 11:03 AM.

Similar Threads

  1. Strange Web Projects Control Panel Behaviour
    By iRadiate in forum Application Server Version 11 - Web/Browser Applications
    Replies: 3
    Last Post: 10-27-2011, 03:27 PM
  2. Number formatting (strange) Issue:
    By gaby_h in forum Application Server Version 10 - Web/Browser Applications
    Replies: 2
    Last Post: 07-13-2011, 08:38 AM
  3. Strange issue with backup compacting
    By gcaplan in forum Alpha Five Version 6
    Replies: 2
    Last Post: 09-13-2005, 11:06 AM
  4. Very strange issue
    By Dustin Owens in forum Alpha Five Version 6
    Replies: 10
    Last Post: 12-17-2004, 06:37 AM
  5. Browse Strange White Box
    By Alan Lucas in forum Alpha Five Version 6
    Replies: 4
    Last Post: 11-20-2004, 03:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •