Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About MaxB.

  • Rank

Profile Information

  • Gender
    Not Telling
  1. Ok, so I have an invoice thing that calculates the total of the invoice by having a summary field that add up the cost of all the line items on it and displays it in the corner. The problem I have is if I give someone a credit on an invoice it displays correctly in the corner, but in the script that fills out and prints the invoice a value gets assigned to be the summary but it sets the wrong value! I do a credit on a invoice by simply adding a line item with a negative cost, this gets added to the value I have in the corner to show me the total, but on my printed invoices (different layout wi
  2. Well now I have no idea how this code was "working as intended" before now. This is super old and poorly documented, I don't even know where the numbers in the comparison are coming from. I do know the $$ is being used to pass the var between scripts though. I could change it to a global field probably if using $$ is such a faux-pas.
  3. The calculation: $$category = "11491961930" or "11491971250" or "11491971250" or "47995855093" or "47995855093" is giving me a TRUE no matter what $$category is. I have no idea what triggered this happening since it used to work properly. I tracked $$category in the debugger and it has $$category as a text string containing no numbers in my test cases so I don't know how it would be matching that to trigger the IF statement.
  4. There's no ready-made script for this because to do this efficiently you want to exploit your table relationships. Assuming you have a resonable table stucture (i.e. CustomersTable--<SalesTable>--ItemsTable) you can just make a Summary Field in the Sales table that is the total of Quantity (or whatever you named the field that contains the number sold in Sales). Then make a layout using the Sales table that looks like this: Part Number Item Quantity Sold [ Items::Part# ] [ Items::Name ] [ QtyTotal ] Where the line "[ Items::P
  5. Cool, putting a Commit Records before the second IF fixed it. Thank you, I would never have thought of that. I have never used Commit Records before, is it good practice to Commit Records after every manipulation step?
  6. It's a calculation with the result as a number. I've sort of figured it out. Earlier in the script Value is used in a different IF statement, and after that Value is changed, and then the IF statement I'm having a problem with happens. I added a dialog pop up showing Value just before the problem IF statement and Value in the dialog box is the same as in the previous IF statement. In other words, Value is being cached when it gets looked up in the first IF and then the same (old and incorrect) value of Value is being used in the second IF statement. I know the changes to Value between the
  7. Hello, I have a simple if statement (simplified): If [myTable::Value < 0] [result 1] Else [result 2] End If The thing is, I get [result 2] even if Value is less than zero. The only thing I could think was that on the current layout Value is displayed as part of a text box (i.e. "Some text <<myTable::Value>> some more text"), but testing this by adding a field for Value doesn't seem to fix it. I am completely stumped.
  8. I have made a solution that does this for a register program. Script loop does all setup then pauses, the Enter at the end of the scan unpauses and the loop continues. In this case just do something like: Loop New Record Go to Field [select/Perform; line_items::barcode] Pause/Resume Script [indefinitely] End Loop The scanner NEEDS to append the Enter for this to work though. Also Enter =/= Carrage Return.
  9. Sorry to bump an old thread, but the XSL file attached is almost exactly what I am looking for. The only thing is I also need the first record to be field names. I don't know anything about XML/XSL so I have no idea how to change this myself.
  10. Hello, I am wondering if there is a way to automatically upload an exported .csv file to an FTP server on a Windows PC. I already have a working solution for Mactintosh by running a calculated AppleScript, but I don't know much about Windows and I don't know of any equivalent for PC. The current method I have just calls cURL in the Terminal.
  11. I figured it out. I don't have "tell" blocks. The native script worked because without a tell block it assumes to mean you are telling the Finder, but for calculated applescripts it assumes you are telling Filemaker. Changing to : tell application "Finder" --my code end tell fixed it
  12. As the title says I'm having trouble exporting records as a csv file to a file on the user's desktop. The problem I have is apparently these export paths: filemac:~/Desktop/LegAve_Orders/$file file:Desktop/LegAve_Orders/$file Both give a "File cannot be created on this disk" error. I assume because the export paths are not correct. Is there even a way to do this without knowing the user name?
  13. So I have a working native applescript already: set stringToFind to """ set stringToReplace to "" set theFile to choose file set theContent to read theFile as «class utf8» set {oldTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, stringToFind} set ti to every text item of theContent set AppleScript's text item delimiters to stringToReplace set newContent to ti as string set AppleScript's text item delimiters to oldTID try set fd to open for access theFile with write permission set eof of fd to 0 write newContent to fd as «class utf8» close acces
  14. I was kind of hoping that it would update in realtime.
  • Create New...

Important Information

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