Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7574 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi Rodrigo!

I think ur on the right track and pretty much answered your won question. Export of your "current sales" file (txt or csv) from DynaCash. I don't know what info will be on the txt file but I assume only the info related to 1 single sale and then use the script as u have to print it. the script could be:

PRINT_SCRIPT

OpenURL[c://current_sale.txt] (to open txt file)+

OpenURL [c://print.bat] (to initaiate DOS print)

I am not familiar with DynaCash capabilities but here is another line of though if u get cought up in producing the desired txt file:

Now, IF your DynacCash can NOT "filter export for current sale" record then do not worry as FM can hadle "filtered importing".

SO in other words:

-DynaCash export ALL sales (eg. this month...this year....whatever ALL if it takes) and generate MEGA_CSV file

-Run an Impot Script in FM that is based on SQL filter for "todays sales" or the "last sale" (eg. SELECT* FROM Sales WHERE Invice_ID ="1002")

at this point FileMaker would contain info on that "1 current sale"....then simply use your "PRINT_SCRIPT"(only this this u would have to export this 1 record into txt file and print with BAT command

......FM is this scenario would be used a "record filter" as well as the "pitstop for desired data" and the "printing initiator"

If you DynaCash CAN filter records...then ur pretty much done just by using the PRINT_SCRIPT.

Now, I only hope I understood you correctly laugh.gif

All the best!

Posted

Rodrigo:

I do something similar to this. You might think of making a concatenation field in FM that would include all your sales info arranged the way DOS would like to see it. I'm hazy on the actual functioning of your sales, though. If someone buys more than one item, is a separate line item record made for each? Or is this info somehow stored in one record?

Even if separate records, you could have each sale stored in a global field and the concatenation field would assemble the globals into one. The concatenation field could live in a separate, two-field one-record database (the other field is a constant to pass the data from the globals based on a constant relationship).

When a sale is concluded, the "finish sale" button's script could call an external script in the one-record database that would export the concatenation field by itself as tab-delimited, named TEMP.TXT, and set up to save to the same place and overwrite the previous version. Then the script would empty the field or the next transaction.

I use tab-delimited for this kind of thing so FM won't add quote marks, as it will in comma-separated. With only one field, no tab characters are inserted. This way, you have total control in how the text will look by setting up your concatenation field correctly. You can insert quotes and commas if needed and only where needed, and insert carriage returns.

Steve Brown

×
×
  • Create New...

Important Information

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