Jump to content


  • Posts

  • Joined

  • Last visited

dbanbury's Achievements


Apprentice (3/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges



  1. Thank you for the information. I think I'm getting used to some of the quirks of the software after developing with it for a few months. I'd also tried setting up a calculated validation on the invoice record itself using the balance field, to make sure it's never a negative number. But what happens then is that the portal records are still committed with the unwanted overallocation and then the balance field fails verification. But now I can't change any portal records because FM insists I correct the balance field, which isn't present on the layout and shouldn't be modified by a user anyway. Of course with a script I can stop the user from exiting the edit layout and committing bad data if the numbers aren't adding up, but it would be nice, since all the fundamentals are already there in the database design, not to have to, to just be able to check whether there was a data validation error before attempting to close the edit window. So it seems to me one way around this problem is to have an auto-enter calculation which overwrites existing data, set up the validation for it, and then set some data in a field for the purpose to force the auto calc field to calculate and which should then attempt to verify. If verification fails, that can be tested for and if true keep the user in a loop until they've deleted the portal lines that are causing the validation error from the perspective of the invoice. Is that about the shape of it? Thanks again for your help. Regards, dave.
  2. Sorry, for clarity, I should also add that Receipt::AmountOfPaymentUNAllocated is a calculated field and it's the fact that this calculation, if there's a batch committal, doesn't seem to be performed after each portal record is committed that's leading to the failure of the data verification. dave.
  3. Hi guys and gals, I have a question relating to data verification in portal rows. I have a relationship of invoice -> invoice credit -> receipt. The receipt table holds the details of a payment received by us from a customer. The amount of the customer payment can then be divided up into as many invoice credit records as desired. An invoice credit may only be attached to one invoice, but an invoice may have any number of credits attached. Similarly, any number of credits are allowed per receipt - so long as the numbers add up. The invoice credits, not the receipts, affect the final invoice balance, which is a value copied from a calculated field to a non-calcualted field in a script at credit/invoice modifcation time to speed up non-zero balance invoice searches. The problem is that this all works wonderfully until I don't commit each invoice credit record individually in the portal row. A calculation validates that the amount of the credit isn't more than the remaining unallocated amount from the receipt used to fund the credit. Entering one record at a time and then comitting it, this verification works fine. But I can keep creating invoice credits in excess of the unallocated balance of the funding receipt if I don't commit the credit records one after another. Does anyone know a way around this, another calculation or function I might use, or do I just have to write more scripts to make sure the data is valid? Help much apprecited. Best wishes, Dave. Case ( Count ( Receipt::ID ) ≠ 0 and Amount > Receipt::AmountOfPaymentUNAllocated ; 0 ; Amount = 0 ; 0 ; Amount > Invoice::Balance ; 0 ; 1 )
  4. Thanks for the info, Brent. Will go along and have a look at that extra info too. I have some new data verification woes but will start a new thread for those. Best, dave
  5. Just thought I'd better add I'm using the newest version of the software, 8.0v3. Cheers, Dave.
  6. Hi, I thought I'd try using FM's built-incustom dialog instead of designing a new layout for one input field. Problem is, if I try and enter a non-numberic value directly into the global field, it fails - as it should. But the custom dialog using the same global field happily accepts and sets the field with data that violates the validation rules. Error capture has been on and off (and captures zero when on) so I presume this is either a bug or I've missed something. Help appreciated! Best wishes, dave,
  7. Thank you, but which script step? The result always seem to be zero. The data validation error should(?) occur after a commit records script step, no? Best, Dave.
  8. Hi, I'm having some trouble stopping my script from dropping out into the wrong window because I can't seem to capture the error code. I have the Set Error Capture On script step right before the Close Window script step. Right after that step I set a $$Error variable with Get (LastError). The problem is that unless valid data is entered, I don't want the window to close or the script to continue, as it is doing now. Help or an example or two would be much appreciated. Best wishes, Dave.
  9. Thanks everyone, particularly LaRetta. I'm still finding my way through the functions and had a similar technique to yours in mind but based on detecting the presence of a period within the text string. I just thought there might be a function already built in to achive this, a bit like the old Basic language instructions for formatting numbers by supplying a template. Anyway, I now use your calc with adjustments to the multiplier, zeros and rounding to achieve what I wanted for 0.1c accounting. Thanks again all. Best, Dave.
  10. I'm sorry but I don't follow. I can't find a merge field function. I know about merge fields but I don't follow how that could be relevant to working on a variable. If I concatenate a string variable to a number field, the result is text but with the number improperly formatted for my needs. I need to force a decimal point and two decimal places, since $200 won't line up in a list of prices such as $4.99, since there won't even be a decimal place added for an integer. Hope this clarifies. Cheers, Dave.
  11. Hi, does anyone know if there is a simple function to return a number with a fixed number of decimal places? I'm having trouble working with mail.it in getting a text string together with price numbers properly lined up. $2.10 for example is coming out $2.1. I know how to set the number of decimals from the formatting menu but need to work with a text string. Help appreciated. Cheers, Dave
  12. HI, thanks for the reply. Are you sure you cn do this in FM Pro 8? I cannot see any way of makign a button do more than one thing. It only lets me select one action. Aghhhhh!
  13. Hi, thank you for your reply. I know there is a button definition to continue a paused script, but this doesn't achieve that I want. I need the button to do two things - set a variable and then resume the paused script. I presume I have to therefore use the button to call a script to set the variable, but then how do I have that script resume the already paused script? Best wishes, dave.
  14. Hi, is it possible to resume a paused script from another script? At the moment I have a script that opens a new window related to postal information and then pauses. I presume pausing the script is the only way of locking the first window indefinitely, is that right? I now want to be able to work in the new window without being able to enter to first window. I want to be able to click a button to set a global variable and then resume the script that opened the window (to close it). I'm sure this has got to be straightforward but at the moment I'm ending up with lots of hanging script ends. Any help much appreciated.
  • Create New...

Important Information

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