Alpha Video Training
Results 1 to 16 of 16

Thread: Progressive lookup - by Jim Chapman

  1. #1
    Member
    Real Name
    Fred Zag
    Join Date
    Mar 2003
    Location
    Central Wisconsin
    Posts
    106

    Default Progressive lookup - by Jim Chapman

    I have been using Jim's progressive lookup for a while in v6. I am currently trying to convert to v8 but the lookup returns an error "Select a record" indicating that vSelect = "" after either a double click or using the OK button.

    Any help/thoughts greatly appreciated.

    Fred
    Fred

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

    Default Re: Progressive lookup - by Jim Chapman

    Fred, give us some sample data and your script. We need to see how you're implementing this in vers 8.

  3. #3
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Progressive lookup - by Jim Chapman

    Fred,

    Have a look at this feature in AlphaSports, Customer Info form.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  4. #4
    Member
    Real Name
    Fred Zag
    Join Date
    Mar 2003
    Location
    Central Wisconsin
    Posts
    106

    Default Re: Progressive lookup - by Jim Chapman

    Hi Tom,

    Exact same code as I was using in v6. Since posting I believe I have the problem down to this line:

    vCurrentLine=word_number_get(vList,vSelect,crlf())

    It's around line 200 in the original code. vList (the llist of current records) looks good, and the vSelect value is in vList, but word_number_get returns a zero. Any chance v8 handles the crlf differently??

    Sorry I'm not giving a lot more data here but I'm trying to cut this app over before business tomorrow AM. Otherwise I'll have to cancel and then have time to rewrite the search before rescheduling. Whoopee!! :)

    Thanks,

    Fred
    Fred

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

    Default Re: Progressive lookup - by Jim Chapman

    Any chance v8 handles the crlf differently??
    I suppose it's possible but I'd be surprised. Recommend you study your data. Will be glad to help but will need the script and sample data. Maybe others are more intuitive than me and can help based on what you've described thus far, but I'm signing off til you post sufficient data for me to see your script (not Jim's) run in context.

    -- tom

  6. #6
    Member
    Real Name
    Fred Zag
    Join Date
    Mar 2003
    Location
    Central Wisconsin
    Posts
    106

    Default Re: Progressive lookup - by Jim Chapman

    Thanks Tom, I understand.
    Fred

  7. #7
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,644

    Default Re: Progressive lookup - by Jim Chapman

    Quote Originally Posted by Tom Cone Jr View Post
    but I'm signing off til you post sufficient data for me to see your script (not Jim's) run in context.
    I use Jim's script a lot and in v8. Jim's script works for me in v8.
    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.

  8. #8
    Member
    Real Name
    Fred Zag
    Join Date
    Mar 2003
    Location
    Central Wisconsin
    Posts
    106

    Default Re: Progressive lookup - by Jim Chapman

    Thanks Al,

    I went back to Jim's original code and am still having the same problem. Guess that tells me the problem must be related to my data.

    Meanwhile looks like time is running out. Oh, well, that will give me time to look at other alternatives.

    Thanks again,
    Fred

  9. #9
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,644

    Default Re: Progressive lookup - by Jim Chapman

    debug(1) is your friend...
    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.

  10. #10
    Member
    Real Name
    Fred Zag
    Join Date
    Mar 2003
    Location
    Central Wisconsin
    Posts
    106

    Default Re: Progressive lookup - by Jim Chapman

    Yup, I hear that Al. Unfortunatly nothing seems to be able to keep word_num_get from returning anthing but a zero! I run exactly the same code against the exact same data in v6 and it works like a charm.
    Fred

  11. #11
    Member
    Real Name
    Jim Coltz
    Join Date
    Oct 2005
    Location
    Western Pennsylvania
    Posts
    600

    Default Re: Progressive lookup - by Jim Chapman

    I had a similar problem with Jim's code that just started with the latest version of V8 1939_3146. I reported it as a bug. Selwyn replied that it wasn't a bug and gave me some new code to replace the existing. The old and new is below. This fixed the problem. BTW, I also reported the month_number() function is not working with the month of March in the latest build as well. This one was confirmed and will be fixed in the next patch.

    Code:
    '_____________________________________________________________________
    'Code created by Selwyn Rabins due to bug report submitted.
    	if atc("vlist_",a_dlg_button) = 1 then
    	
    	if a_dlg_button = "vList_Change"
    	dim pos as n
    	pos = atc("{data=" + alltrim(vselect),vlist)
    	vCurrentLine = word_from_pos(vlist,pos,crlf())
    	
    	vReturnString = GetCurrentValues("vList_Changed",vCurrentLine)
    	a_dlg_button = ""
    	else
    	a_dlg_button = ""
    	end if
    	end if 
    '_____________________________________________________________________
    'Original code below and commented out
    
    'if a_dlg_button = "vList_Change"
    '	a_dlg_button = ""
    '	vCurrentLine = word_number_get(vList,vSelect,crlf())
    '	vReturnString = GetCurrentValues("vList_Changed",vCurrentLine)
    'end if 
    'if left(a_dlg_button,6) = "vList_"
    '	a_dlg_button = ""
    'end if 
    '______________________________________________________________________
    I'm not fluent enough in xbasic to know why the one works and the other doesn't or why this code has worked in V6, V7, and V8 up until the latest update.

  12. #12
    Member
    Real Name
    Fred Zag
    Join Date
    Mar 2003
    Location
    Central Wisconsin
    Posts
    106

    Default Re: Progressive lookup - by Jim Chapman

    Thanks a million for the quick response, Jim. It worked just great! I know I could have rewritten it ala Alpha Sports, and may have to eventually, but for now I'll just procrastinate.

    Besides I really like Jim's (Chapman) code. My users are really pleased with the speed as well as the touch/feel of the lookup! My hat's off to the both of you!

    And thanks to all who chimed in here. Whether you solved the problem or not, it's just a lot less lonely knowing that someone is out there ready to try to help.

    Thanks,
    Fred

  13. #13
    Member
    Real Name
    Jim Coltz
    Join Date
    Oct 2005
    Location
    Western Pennsylvania
    Posts
    600

    Default Re: Progressive lookup - by Jim Chapman

    Glad I could help. I've certainly received lots of help from this board and like to give back when I can.

  14. #14
    Member
    Real Name
    Connie DeCinko
    Join Date
    Mar 2008
    Location
    Phoenix, AZ
    Posts
    72

    Default Re: Progressive lookup - by Jim Chapman

    Has anyone come up with a progressive lookup version that looks up values from right to left, so to speak? This would be helpful for fields that pad the first digits.

    For example: enter 3 and get all results ending in 3, enter 34 and get all results ending in 34, enter 347 and get all results ending in 347 (such as 00000347).

  15. #15
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,644

    Default Re: Progressive lookup - by Jim Chapman

    Quote Originally Posted by CDeCinko View Post
    Has anyone come up with a progressive lookup version that looks up values from right to left, so to speak? This would be helpful for fields that pad the first digits.

    For example: enter 3 and get all results ending in 3, enter 34 and get all results ending in 34, enter 347 and get all results ending in 347 (such as 00000347).
    Oops - better to post a reply... rather than a blank reply...

    Actually you can control what you want by refining an index to have the values that you want in it

    something like stripping out the leading zeroes.

    Since you have only numbers in the character field, convert to a value, convert back to a character field and left justify it

    ltrim(str(val(<yourfield>)),<maxnbrofdigits>)

    or something like that....
    Last edited by Al Buchholz; 09-16-2008 at 09:17 PM.
    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.

  16. #16
    VAR
    Real Name
    Bill Parker
    Join Date
    Apr 2000
    Location
    Dallas, TX
    Posts
    1,719

    Default Re: Progressive lookup - by Jim Chapman

    Martin Cole has posted a lookup routine in the code archive that finds a string anywhere within a field. So if you searched for "347", it would locate the record with a value of "1234789". Not sure if that helps you.

    Bill.

Similar Threads

  1. progressive lookup
    By dik_coleman in forum Alpha Five Version 5
    Replies: 2
    Last Post: 06-26-2004, 04:16 PM
  2. Progressive lookup Value
    By forskare in forum Alpha Five Version 5
    Replies: 5
    Last Post: 02-22-2004, 04:33 AM
  3. Thank You - Jim Chapman
    By John Gamble in forum Alpha Five Version 5
    Replies: 6
    Last Post: 01-18-2004, 11:18 PM
  4. Jim Chapman
    By Bradford Powell in forum Alpha Five Version 5
    Replies: 4
    Last Post: 12-01-2003, 06:13 AM
  5. Progressive Lookup
    By Louis Nickerson in forum Alpha Five Version 5
    Replies: 4
    Last Post: 09-29-2003, 08:46 AM

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
  •