April 30, 200619 yr Newbies Hi I want to create a button and to count every time that button pressed. The purpose is to figure out the total number of a particular number of items I have encountered on a particular day. I intend to have a record a day and to be counting about 20 – 30 variables that I need to total at the end of the day With this total I would like to perform some simple math’s functions. I would appreciate somebody’s help :)
April 30, 200619 yr What exactly are the 20-30 variables you mention? In terms of a counting each time the button is pressed (in a day assuming that you want to keep the data for each particular day). Take a look at this sample file. sample_file.zip
April 30, 200619 yr Author Newbies Hi Thank you for your help : : What I am counting on a daily basis is different meals served to staff, At the end of each day I get a printout from a cash register that tells me the various meals and drinks consumed, but it is not totaled so I have to do it manually (argh) What I want to do is create a filemaker database that tracks daily consumption of each item and then gives me a daily total of how many different types of meals are eaten Eg Bacon and Egg 20 Fish of day 15 Cold drinks 23 My intention was to create a db with a record (field) for each menu item and another for number consumed. I would turn the menu item into a button, so every time I press that button it would increment by one. I would then just total up meal types consumed for the day I would want to keep a record for each day usage
May 1, 200619 yr My gut response would be 'get a new cash register, for crying out loud'. Surely, in 2006, it should not be necessary to manually reinput data... Ah, well. The problem with your solution is there's no audit trail. If you accidentally press a button twice, or worse, if you're not sure if a click registered or not - your entire stack for that day is ruined. So if you absolutely must go this way, you should have each button create a RECORD with at least two fields - the product and the date. This way, if you make a mistake, you can always go back and find the discrepancy between the printout and your entry. A convenient layout for data entry would have a portal showing all products. Clicking on a product name in the portal would create a new sale record for this product with the current (or global) date. (You will need two files for this - Products and Sales, and a couple of global fields to hold the temp data for the scripts.) Then you can easily summarize the sales by date and product.
May 1, 200619 yr Author Newbies Hello and thank you for the help and advise. The cash register is a computer based (SQL) POS that our cafeteria inherited when it took over form the last operator. The supplier claims that we can not perform any reports other than totals until the NEXT VERSION due in July. It seems any question I ask is dealt with in the NEXT VERSION…. Very dull The problem is a simple and embarrassing one, I don’t know the code to make a button increment a record by one. I have created two fields one called product and the other called number. The field product has been turned into a button and I cant work out how to make the press increase the number field.
May 1, 200619 yr I am afraid you misunderstood my suggestion. First, you need a file to hold the entered data, let's call it Sales. In Sales, each single sold item is a separate record. There is no incrementing of any number. The fields you need are Product and Date. Next you need a SERIES of buttons. Now, you could create a separate button per product, and a separate script for each button, that would go something like: New Record Set Field [ Product ; "Bacon and Egg" ] Set Field [ Date ; Status (CurrentDate) ] Exit Record Now this is tedious, so I would put the product names in another file (Products), show them in a portal, and make the RELATED field inside the portal a button. Then I would need only one script: Set Field [ gProduct ; Products::Product ] New Record Set Field [ Product ; gProduct ] Set Field [ Date ; Status (CurrentDate) ] Exit Record
May 2, 200619 yr Author Newbies Hi and thanks for taking the time to respond I think I may have explained the problem poorly. : What I get at the end of a day is a register receipt with the sales for the day. What I want to do is categories the items between main meals, entrée, and deserts. So what I want to do is have three buttons and as I go through the receipts I click the respective button to increase the count by 1 I can create a button but cant figure out the script to have it increase another field by one when pressed I hope this better explains my problem :
May 2, 200619 yr The first script should be: Set Field [ MainMeals ; MainMeals + 1 ] My warning about no audit trail still applies.
Create an account or sign in to comment