Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5624 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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!

Posted

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 )

Posted

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.

Posted (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. :wink2:

UPDATE: Or write it as: not ( empty or zero) :wink2:

Edited by Guest
Added Update
Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.