Jump to content

Condittional Record Creation


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

Recommended Posts

Hi Group,

I already have a script that attaches to a button, that when performed crates a new record. At that point the user enters a "customer name" and all of the look fields do their work. One field "terms" is looked up and can possibly contain the words "CREDIT HOLD". What I would like to happen is that if the field is populated with "Credit Hold" after the look up fields populate the record that the DB then switches to a layout that advises the data entry person that this person is on credit hold and not to proceed further without speaking to finance.

I can't figure out how to script this. Can anyone help? I know this should be easy but I am missing something basic.

Any help woudl be appreciated.

Thanks,

Steve

Link to comment
Share on other sites

I'm not the best to answer, but I'll offer a gesture which might tide you over til someone else has a wiser word:

There's not a good way to get something to happen immediately upon exiting a field in genuine data entry mode, but you can certainly make your button start a script which sends the data entry person to a special layout and *pauses while waiting* for the customer name to be input... the data entry person then uses a "Continue" button which is defined to get the script to proceed. The script commits/exits the record (triggering the lookups) and then checks for the "Credit Hold" problem, and proceeds as necessary...

Another frequently recommended path would be to create a global field gNewName to hold the name information for an about-to-be created record. The "Enter New Name" button goes to a layout which allows entry of a this new name into the global, along with a button labelled to initiate a record for this new individual. But that button in fact delays creation of the new record and first uses a relation between gNewName and the table with name & credit info to make the appropriate check for credit issues and redirect the data entry staff as necessary, even before creating a record. A dialogue or layout with "Do not proceed without speaking to finance" could then have "cancel new record" or "proceed with new record" options, depending on customers' and finance's reactions...

This would be particularly useful if your data entry folks ever end up aborting records at this or some other early stage -- that way the database doesn't become clogged with partially entered records. There are many other posts here on this method of using one or more global fields to serve as receptacles for new data prior to confirming the need for a new record and copying the global data into the relevant fields with a script. One important pointer is that you want the script to end by clearing out the global receptacle field(s) so that future records will get a clean slate...

Link to comment
Share on other sites

This topic is 6438 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
 Share

×
×
  • Create New...

Important Information

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