Jump to content

Checking for existing record


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

Recommended Posts

Right, this is so easy, I know, but I've caught myself going around in circles and I'm giving in and asking for help. I'm modifying an existing db and I'd like to avoid re-constructing it as it's working quite nicely as it is.

I have a global called 'Name' on a layout called 'System', that the user must enter a unique name into. User then clicks a button to execute a script that creates the record and clears the global field - the script catches if the Name isn't unique and exits, however I want to take this a step further and still have the global field turn red before the script is executed.

The global field (gName) is located within a table called "Global", the record is actually created within a table called "Accounts".

There are two TO's of the global table - "System" and "Global". System is joined to Accounts by a cartesian join. I have created a separate TO of Accounts called "Account Check" and joined the 'Name' field to 'gName' and created a conditional statement saying "Account Check::Name = Globals::gName" and I'm not getting the results I'm expecting.

What am I overlooking here to achieve such a simple result?

Link to comment
Share on other sites

Ok, I have figured it out. For anyone interested, the Account Check TO wasn't necessary. This is the calculation that ended up working:

not IsEmpty( FilterValues (List (Accounts::Name) ; GLOBAL::gName))

 

Link to comment
Share on other sites

This topic is 3176 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.