June 29, 200916 yr 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!
June 29, 200916 yr 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 )
June 29, 200916 yr 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.
June 30, 200916 yr 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, 200916 yr by Guest Added Update
June 30, 200916 yr 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
Create an account or sign in to comment