Alpha Video Training
Results 1 to 14 of 14

Thread: Lookup On Conditional Field

  1. #1
    Member
    Real Name
    Alli Crader
    Join Date
    Sep 2013
    Posts
    39

    Default Lookup On Conditional Field

    I have a lookup set up on a conditional field and I need to make it to where the lookup will not pull in anything if it does not match exactly. Right now if you pull in the information from the lookup it will change the calculated field and the fields that it is calculated from.


    I had to build this lookup on the form level to get to work. I am having issues with employees pulling in the wrong information when what they enter is not in the lookup table.

    Can anyone help me figure out how to get Alpha Anywhere to not let information be pulled in unless the fields match?

    Hope I explained this correctly

    thanks

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

    Default Re: Lookup On Conditional Field

    The standard table lookup by default does not allow user enterd values (unless you set options on).

  3. #3
    Member
    Real Name
    Alli Crader
    Join Date
    Sep 2013
    Posts
    39

    Default Re: Lookup On Conditional Field

    Even the default setting allows you to pull the incorrect information in,

    Quote Originally Posted by Ray in Capetown View Post
    The standard table lookup by default does not allow user enterd values (unless you set options on).

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

    Default Re: Lookup On Conditional Field

    What does "pull in" mean?
    Does that indicate that it is not a user keyed entry but one that was pulled out of the look-up table?
    Any way, check settings is all I can suggest without a sample.

  5. #5
    Member
    Real Name
    Alli Crader
    Join Date
    Sep 2013
    Posts
    39

    Default Re: Lookup On Conditional Field

    i have tried all the settings.... I cant figure it out. And yes the information is brought in from the lookup table if the look up field matches, but I cant figure out how to make it not come in if it doesnt match.

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

    Default Re: Lookup On Conditional Field

    Alli,

    It's not clear to me what a "conditional field" might be? Is this a field in your table? Have you tried to define a table lookup field rule for it? Are you saying the rule is set to "force closest match", but the users are picking the wrong values on purpose or by accident?

  7. #7
    Member
    Real Name
    Alli Crader
    Join Date
    Sep 2013
    Posts
    39

    Default Re: Lookup On Conditional Field

    I meant a calculated field. I had to define the lookup on the form level. I have tried all the settings and no matter what they can pull in the wrong info. They are doing it by accident but it needs to be invalid unless they match perfectly. Its for data entry

    Quote Originally Posted by Tom Cone Jr View Post
    Alli,

    It's not clear to me what a "conditional field" might be? Is this a field in your table? Have you tried to define a table lookup field rule for it? Are you saying the rule is set to "force closest match", but the users are picking the wrong values on purpose or by accident?

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

    Default Re: Lookup On Conditional Field

    Not making much sense - it is brought in if it matches, what comes in then if there is no match - probably the closest match.
    If there is no match then you want the user to clear the field ? why have a lookup for no match?
    Sample
    sample sample
    otherwise this gets silly.

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

    Default Re: Lookup On Conditional Field

    Alli,

    I asked 4 questions and you responded to one of them. Not a passing grade. Not helpful to effective communication.

    Let me add other questions. Please take your time and respond to all of them. If the questions themselves are confusing to you let us know that, also.

    5) the "calculated field" ... is it a calculated display field that exists in your form only, or is it a table field for which you have defined an expression to compute a result?

    6) concerning the "calculated field" ... what's the expression you've used to define the computed result you want?

    7) what does "match perfectly" mean?

    8) when they pick a value off the lookup list how might Alpha Five "know" that there's a mismatch?

  10. #10
    Member
    Real Name
    Alli Crader
    Join Date
    Sep 2013
    Posts
    39

    Default Re: Lookup On Conditional Field

    Hey Tom, this is Alli's manager Jim, I'll try and give you a precise answer.

    I asked 4 questions and you responded to one of them. Not a passing grade. Not helpful to effective communication.

    Let me add other questions. Please take your time and respond to all of them. If the questions themselves are confusing to you let us know that, also.

    5) the "calculated field" ... is it a calculated display field that exists in your form only, or is it a table field for which you have defined an expression to compute a result?
    Form only

    6) concerning the "calculated field" ... what's the expression you've used to define the computed result you want?
    RIGHT('0000'+ALLTRIM(STR(BOOKMAP)),4)+RIGHT('00'+ALLTRIM(STR(PAGE)),2)+ALLTRIM(LOT)

    7) what does "match perfectly" mean?
    Alli means a exact match into the lookup table. If there is no exact match the dropdown menu will still "point" to a record in the lookup table. Herein lies the problem, Employees are selecting records that don't match and introducing errant data

    This is a match
    match.JPG

    This is not a match
    lookup.JPG


    8) when they pick a value off the lookup list how might Alpha Five "know" that there's a mismatch?

    Alpha Five "knows" because it will place a check mark by the corresponding record shown in the drop down list. This is what we're trying to find out. The drop down list is a range of records near the key you are searching for. If the search key matches the key in the lookup table a check mark is displayed. Since the code that does the matching and pulls the range of records is behind the scenes, we're not sure how to tell if Alpha Five "knows". If this were a webpage it would not be a problem. The SQL result set would be null and nothing would be displayed in the drop down list.

    thank you,

    Jim Patterson
    General Manager
    The Information Market.

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

    Default Re: Lookup On Conditional Field

    Jim, thanks.

    Let me try to restate the issue. Tell me if I'm getting closer to understanding.

    You have a calculated display field on your form that computes a value. i.e. map, page and lot to uniquely identify a property

    You want to "lookup" additional information about that property from a separate table, and have chosen to use a table lookup field rule so the user can search for the property using the computed value in your calc display field. The users are selecting the wrong properties and Alpha is not alerting them that the value they've chosen is different from the calc display field value.

    If this were me, I'd abandon the use of a table lookup that relies on the user being careful enough to select the correct property. Instead, I'd retrieve the additional data using one or more of the lookup() functions. Lookup(), LookupC(), LookupN(), etc. These will return field values from the "Lookup" table only if there's a match. These could be incorporated into the rules for the form, or a script could be written to collect the desired field values all at once, running from a button push or some other appropriate event in your design.

    An alternative would be to include validation routines in your present approach. These would run before the record is committed to disk, and would block the save if there's a mismatch. The script that does this could remove the offending field values for you.

    Later...

    I suppose yet another approach would filter the lookup list to show only matching values.
    Last edited by Tom Cone Jr; 02-18-2014 at 11:08 AM.

  12. #12
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,114

    Default Re: Lookup On Conditional Field

    The way that I did this: I chose the look-up to be an edit combo from the same table the search was happening - that way a user can only enter a value that is in there to start with. You can filter that same look up - this allows for department, user, or about anything if you use a variable to filter on.
    If the user selects the number they are looking for then only that record will show.
    Hope that helps.

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

    Default Re: Lookup On Conditional Field

    Hi, Charles.

    thanks for your post.

    It's more than a little disappointing that the original poster has seemingly wandered away...

  14. #14
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    2,114

    Default Re: Lookup On Conditional Field

    It happens, life can be a rat race at times - no worries. Perhaps he figured it out, no longer needs advice or just changed strategies. Either way, I figure someone else may have that moment of clarity we have all felt when you suddenly realize what you need to do from one of the posts made!

Similar Threads

  1. Conditional table lookup - with no lookup
    By CALocklin in forum Alpha Five Version 11 - Desktop Applications
    Replies: 17
    Last Post: 04-09-2013, 01:43 PM
  2. conditional format for lookup field's template
    By leetv in forum Application Server Version 11 - Web/Browser Applications
    Replies: 7
    Last Post: 09-19-2012, 06:20 PM
  3. 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
  4. Conditional Table Lookup - field not recognized
    By Jeff Fried in forum Alpha Five Version 6
    Replies: 1
    Last Post: 02-15-2005, 06:20 AM
  5. conditional table Lookup-Field not found
    By Robert Picard in forum Alpha Five Version 5
    Replies: 2
    Last Post: 10-09-2003, 11:04 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
  •