Alpha Video Training
Results 1 to 8 of 8

Thread: Lookup List Field Rules

  1. #1
    Member
    Real Name
    larry green
    Join Date
    May 2012
    Posts
    1

    Default Lookup List Field Rules

    I've created a lookup list for input of data, but I cannot set the rules to show everything in the lookup list in alpha format (A to Z). Do I have to create a lookup table in order to do this or can a simple list be set in alpha order?

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

    Default Re: Lookup List Field Rules

    If you're using a simple list lookup I think you have to arrange the desired sort sequence in the list by hand. i.e. in the list you build in field rules.

  3. #3
    Guest
    Real Name
    Bob Sullivan
    Join Date
    Oct 2005
    Location
    PALMETTO FL
    Posts
    81

    Default Re: Lookup List Field Rules

    Tom is right.

    I found this out the hard way and as such I use lookup tables.
    The problem with the lists is that they tend to change with time and ordering every time there is a change is a pain.
    The tables can be indexed and ordered.

    Bob

  4. #4
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: Lookup List Field Rules

    This should alphabetize a lookup field rule simple list.

    Code:
    tbl = table.open("tablename")
    rul = tbl.rules_get()
    entries =  rul.fieldname.Lookup.Simple_List.size()
    pres_order = ""
    for qx = 1 to entries
    	pres_order = pres_order+rul.fieldname.Lookup.Simple_List[qx].ID+crlf()
    next
    new_order = sortsubstr(pres_order,crlf())
    for qz = 1 to entries
    	rul.change_begin()
    	rul.fieldname.Lookup.Simple_List[qz].ID = word(new_order,qz,crlf())
    	rul.change_end()
    next
    tbl.close()

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

    Default Re: Lookup List Field Rules

    That Stan comes up with some of the best code ever...
    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.

  6. #6
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: Lookup List Field Rules

    Aww, you say the sweetest things.

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

    Default Re: Lookup List Field Rules

    I know this is old, but looking thru the methods for a field's table lookup is a bit daunting. I am having trouble getting a table lookup to reflect the column sizes I set and instead they are all scrunched together. Also I am not using the drop down option. I have tried deleting the rule, compacting the table and adding it back but it keeps doing the same thing. So then I tried setting a form based field rule lookup, but get the same result. I need the feature to fill in a field. Other fields in the table have lookups and they are working fine - its just this one field.

    Any ideas?
    Last edited by MoGrace; 09-26-2018 at 10:03 PM.
    Robin

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

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

    Default Re: Lookup List Field Rules

    In case anyone is interested my workaround was to create a custom browse and use that for my lookup table. It still doesn't show my columns at the width I wanted but at least it is readable now.
    Robin

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

Similar Threads

  1. table/ field rules/ dropdown list/ lookup problem
    By Larry Ternowski in forum Alpha Five Version 10 - Desktop Applications
    Replies: 10
    Last Post: 03-25-2010, 01:02 PM
  2. field rules - conditional Lookup (No Drop List)
    By enstorms in forum Alpha Five Version 9 - Desktop Applications
    Replies: 3
    Last Post: 04-10-2009, 08:22 AM
  3. Field Rules Selection List
    By davej in forum Archived Wishlist
    Replies: 3
    Last Post: 03-06-2005, 06:44 PM
  4. Cascading list in field rules
    By Robin Sculthorpe in forum Alpha Five Version 4
    Replies: 0
    Last Post: 09-12-2001, 05:32 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
  •