Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No record if value <X

Status
Not open for further replies.

etalentweb

Technical User
Jun 14, 2006
5
US
I've got a layout I use to create (and print out) checks. It's simply a layout with a series of edit boxes and a portal on it. One of the edit boxes on this "checks" layout provides the amount. The whole layout works great, but I've got one little problem.

I want the layout to generate a record only when the value in the [Amount] field reaches a certain value. How?

I would make the [Amount] field a calculated field in some way. Right? I'm really in the dark as to how to go about this. Please help.

Thanks,
-Dave
 
The only way to do this is scripting.

Make your requirements for the creation of a record and make the script based upon this requirements.
(If statement)

The problem will be when and how the script needs a trigger, when to run.

Not knowing the structure of you app. I would use the plugin on the FM CD to trigger the script.

First make a search to find the records matching the requirements.
Loop through the found set to check for a match with the requirements and make or make not a record.

Or...

you can reverse the whole process.
Instead of looking when to make a record, look when NOT to make a record.

It will still be scripting and find a way to trigger the script.

In pseudocode, it can be something like:
If(
Amount > "YourLimit")
new record/request

HTH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top