orbitNZ Posted April 20, 2005 Posted April 20, 2005 Hey, Ive made an invoice program for my dads friends bussiness and it has a button that when clicked it displays "PAID" in big bold red font over the invoice details (and it dissapears when clicked again). Now thats all fine but my question is: How do i make its so it says Paid on: (the date the button was clicked)? Not the date that the record was created. I have this script so far: If(IsEmpty(_ispaid), "Paid", ""). under a setField action. Thanks
BobWeaver Posted April 20, 2005 Posted April 20, 2005 Try this: If(IsEmpty(_ispaid), "Paid on "&Get(CurrentDate), "")
orbitNZ Posted April 20, 2005 Author Posted April 20, 2005 Ok thanks that looks promising. But when i click ok to save the script it says: Either an operation was omitted, this function cannot be fount, or "(" was not expected here. and it highlights the word Get. This is when i click ok for specifing the field calculation for SetField
BobWeaver Posted April 20, 2005 Posted April 20, 2005 Are you using version 7? I notice that you were using commas instead of semicolons between parameters which is a version 6 convention. If version 6, then you would use Status(CurrentDate) instead of Get(CurrentDate). Otherwise, make sure that your opening and closing quotes and parentheses match up.
orbitNZ Posted April 20, 2005 Author Posted April 20, 2005 Thanks, its working now that ive changed it to status..... well sort of. When i clicked the paid buton it said: Paid on 732057. Is that the date in a special format or something? p.s Im using FileMaker pro 6
Lee Smith Posted April 20, 2005 Posted April 20, 2005 Change the Result of the Calulation to Date, it's showing as a number now. The Default for Calculations. -Just go into the Calculation Box, and at the bottom there is a Pull Down Menu with "Number" in it now. HTH Lee
orbitNZ Posted April 21, 2005 Author Posted April 21, 2005 hey Lee thanks for the reply but its actually a text field. And the calculation is in a script under the setfield command. So there is know pull down menu under setfield to change to date .
orbitNZ Posted April 21, 2005 Author Posted April 21, 2005 hey Lee thanks for the reply but its actually a text field. And the calculation is in a script under the setfield command. So there is know pull down menu under setfield to change to date . It also says when you click specify for setfield it says it must return text. Thanks
Lee Smith Posted April 21, 2005 Posted April 21, 2005 I don't have v7 (it's on the way), so I can't be sure if there are easier ways in it than in previous versions. In v6, you would need to use the Script Step" Insert Calculated Result" and one of the Date Function. HTH Lee
orbitNZ Posted April 21, 2005 Author Posted April 21, 2005 ok. Im actually using version 6 so could you please elaborate?
Lee Smith Posted April 21, 2005 Posted April 21, 2005 Post your script and well see if we can make it work
orbitNZ Posted April 21, 2005 Author Posted April 21, 2005 OK ive upload the file, but I have deleted all current records the database had (for privacy) I have created one test record under Option 1. So just click the view all button then click unpaid too get to it. Once you are at the record there should be a button down the botton called "Paid" when you click it it toggles the Paid on: (date) text acrosss the screen. The script for this is called isPaid in the scripts menu, this is the one I need help with. The file has been uploaded to: http://orbit.corruptspace.com/invoice-copy.fp5 if you cannot download it from there you may have to goto http://orbit.corruptspace.com/invoice-copy.fp5 and click save target as or download linked file from your browser Thanks
comment Posted April 22, 2005 Posted April 22, 2005 Try expanding the field a bit, or reducing the font size, so that you can see the entire field contents.
BobWeaver Posted April 22, 2005 Posted April 22, 2005 Try changing to this: If(IsEmpty(_ispaid), "Paid on "&DateToText(Status(CurrentDate)), "")
Recommended Posts
This topic is 7158 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