videopuppy Posted March 13, 2007 Posted March 13, 2007 Hello all, In adding a feature to my db for summing clients outstanding dues to a predefined limit I'm running into a snafu. I would assume that this has to be done using a script. Here is my first attempt, which is probably WAY off! Any help would be cool! THANKS Dave
riseagainstme Posted March 14, 2007 Posted March 14, 2007 (edited) Here's what I would do. 1. Duplicate the script. Edit the copy. 2. Remove enter find mode 3. Remove set field 4. Click specify find requests under Perform find (specify the first criteria ie status="Billed") 5. Add extend found underneath perform find, click specify (specify the second criteria ie status="Cancel") 6. Under "set variable" click specify and enter the equation of what you want the variable to equal. Then remove the Insert calculated result function(which makes very little sense to me). 7. Remove the blank if statement... I'm assuming this is a syntax error on your part? What do you want to occur if "Price Grand total($CreditLimit)" is less than/equal to field: credit limit ? Because right now, nothing will occur no matter what the result is. I think your If's and your variable are screwed up. Try writing it out in pseudo-code, then it will be a lot easier to know what you're trying to accomplish. Also your first three lines are launching other scripts that can be accomplished with a single function (at least their names imply so). It would be nice to know what all these do. Like is the "Allow user abort" script, just the "allow user abort function"? Edited March 14, 2007 by Guest
videopuppy Posted March 15, 2007 Author Posted March 15, 2007 (edited) Thanks for answering me. Explanation of what I want the script to do. 1.) Sum the total of all unpaid invoices for a particular client. 2.) Compare that total to a preset credit limit. 3.) If the sum exceeds the credit limit either/both a message is diplayed or the fields on the invoice layout become locked. That's about it. Customer number > Total of all unpaid invoices > compare > message or no message. I think I have most of it figured out, but I'm not sure how to associate this to individual customers. I know I have to do it using a serialized key, but how? I'm thinking using "Set Field"? Thanks Dave Edited March 15, 2007 by Guest
Recommended Posts
This topic is 6520 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 accountSign in
Already have an account? Sign in here.
Sign In Now