Alpha Video Training
Results 1 to 6 of 6

Thread: Field rule lookup - select "A"; enter "X"

  1. #1
    "Certified" Alphaholic
    Real Name
    Cal Locklin
    Join Date
    Mar 2000
    Location
    S.E. Michigan
    Posts
    5,763

    Default Field rule lookup - select "A"; enter "X"

    Maybe I'm mixing one concept with another but I thought there was a way to create a simple(?) lookup list in the field rules that would allow you to see/type one thing but enter something else into the field.

    Example:
    I'd like to see a list that says:
    A
    B
    C

    But enters the actual value as:
    Item 1
    Item 2
    Item 3

    The problem with entering the actual value is that each actual value starts with the same letter which means the user either has to type the whole thing or select it with the mouse - not something real data entry people like to do.

    I'd swear there was something somewhere that had a syntax something like:
    A:Item 1
    B:Item 2
    C:Item 3
    that allowed the user to type "A" and get "Item 1". Anybody know if something like this can be done in the regular field rule lookup?

    I don't want a cascading list or a table lookup. If it's the only choice, I can do those myself - just wondering if I'm on the right track here and just having a momentary "black out". If I have to, I could probably come up an xdialog routine or a CanWrite routine but I'd rather do something like I've described if it's available.

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

    Default Re: Field rule lookup - select "A"; enter "X"

    Perhaps you're thinking of "coded lookups" ? They're not quite what you describe but they're pretty close. I think you'd have to implement them using a table lookup field rule, not a simple list.

  3. #3
    "Certified" Alphaholic NoeticCC's Avatar
    Real Name
    Andrea Gill
    Join Date
    Nov 2007
    Location
    Golcar, West Yorkshire, UK
    Posts
    2,070

    Default Re: Field rule lookup - select "A"; enter "X"

    Display + "|" + Value I believe... I think the | is called a pipe character?

  4. #4
    "Certified" Alphaholic
    Real Name
    Cal Locklin
    Join Date
    Mar 2000
    Location
    S.E. Michigan
    Posts
    5,763

    Default Re: Field rule lookup - select "A"; enter "X"

    The pipe symbol didn't work and I don't want to build another table just for this so I just added the following code in the CanWrite event.

    If anyone does know of an easy way to do this in the regular field rules, let me know. If not, I'll post it in the wish list.

    Code:
    IF a_field_value = "D"
        A_field_value = "Agent Drops"
    ELSEIF A_field_value = "H" .or. A_field_value = "G" 'just to catch typos.
        A_field_value = "Agent Hangs"
    END IF
    (No, we are not really hanging the agent. That's just short for, "The real estate agent will hang the sign after the post is installed." On the other hand, I've met a few real estate agents that might be worth hanging.)

  5. #5
    "Certified" Alphaholic Tom Henkel's Avatar
    Real Name
    Tom Henkel
    Join Date
    May 2002
    Location
    New Jersey, USA
    Posts
    1,877

    Default Re: Field rule lookup - select "A"; enter "X"

    Hi, Cal,

    I've done what you want with an x-dialog using the pipe "|" character, but I don't see that offered in the field rules.

    Tom

  6. #6
    "Certified" Alphaholic NoeticCC's Avatar
    Real Name
    Andrea Gill
    Join Date
    Nov 2007
    Location
    Golcar, West Yorkshire, UK
    Posts
    2,070

    Default Re: Field rule lookup - select "A"; enter "X"

    Quote Originally Posted by CALocklin View Post
    The pipe symbol didn't work and I don't want to build another table just for this
    Ah yes I remember now... This bugged me too, must have forgotten about it because I moved on swiftly and created a lookup table...

    However having thought on it a bit, there is a way to get around it. Have 1 field in the database for the value and one for the text, then define a lookup (simple list) on the text field, and add the value column to the lookup. Specify the list of values in the value column and the list of corresponding display texts in the text column. This then displays the text field choices in the dropdown or browse lookup for that field, and also stores the value in the other field. (See screenshots)

    I don't see why there shouldn't be an option for lookups, so yes I second the suggestion... However the nature of a lookup field in A5 is that you fill several fields with the choice made in one field, so I guess that is why such dropdowns are customised for this purpose? Also, it does make displaying the value in reports etc. easier, too...
    Last edited by NoeticCC; 01-24-2008 at 04:53 PM.

Similar Threads

  1. "not in list rule" lookup question
    By Scholin in forum Application Server Version 8
    Replies: 7
    Last Post: 09-26-2007, 03:29 PM
  2. Frustrated with "Browse Layout to Display" field rule
    By smrogers in forum Alpha Five Version 7
    Replies: 3
    Last Post: 03-20-2006, 01:56 PM
  3. Help with "enter new record in lookup table"
    By jerry cooper in forum Alpha Five Version 7
    Replies: 0
    Last Post: 01-09-2006, 08:13 PM
  4. "Required" Field rule hiccups
    By Stephen Williams in forum Alpha Five Version 5
    Replies: 3
    Last Post: 04-01-2003, 03:35 PM
  5. "unique" field rule problem.
    By Robert Bowman in forum Alpha Five Version 5
    Replies: 19
    Last Post: 01-22-2003, 06:22 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
  •