MicheleC Posted June 29, 2009 Posted June 29, 2009 I have two tables, Collections and Restrictions, which are related via a unique ID string (CollectionID). For most of the records, the ID is numeric but for a few it's alpha. When viewing the Collection table, I have a script that when activated should display a dialog box showing related information from the Restrictions table. Not all collections have restrictions, so the script looks like this: [color:blue]If [Restrictions::CollectionID] Show Custom Dialog [ Title: Collection::collection_title&" -- "&Restrictions::restr_type; Message: Restrictions::restr_text; Buttons: "OK"] End If When the ID is numeric, it works great. When the ID is alphabetic, it doesn't work. Is the test I'm using only for numeric data? What do I need to change so that it works? Thanks!
comment Posted June 29, 2009 Posted June 29, 2009 Is the test I'm using only for numeric data? Yes. Actually, it's for numeric data that's not empty or zero. What do I need to change so that it works? Try: not IsEmpty ( Restrictions::CollectionID )
mr_vodka Posted June 29, 2009 Posted June 29, 2009 Well if it is alphanumeric it will work. But just alpha no. Instead use If [ IsEmpty ( Restrictions::CollectionID) ] to see if the field is not empty.
LaRetta Posted June 30, 2009 Posted June 30, 2009 (edited) Yes. Actually, it's for numeric data that's not empty or zero. A matter of wording only but sliding the word NOT in there might help. Actually, it's for numeric data that's not empty or NOT zero. I only mention it because I did a double-take when I first read it and someone else might misunderstand. UPDATE: Or write it as: not ( empty or zero) :wink2: Edited June 30, 2009 by Guest Added Update
comment Posted June 30, 2009 Posted June 30, 2009 Right, human language is not as precise as mathematical notation. For example, I did a double-take at your using "or" instead of "and" because: not ( empty or zero ) = not empty and not zero
MicheleC Posted June 30, 2009 Author Posted June 30, 2009 w00t! You guys are great (and speedy) -- works like a charm, thanks :
Recommended Posts
This topic is 5624 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now