Jump to content
Server Maintenance This Week. ×

Check Boxes and Values


dbbreaker

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

Recommended Posts

Hey everyone

 

I am a newbie feeling my way around Filemaker Pro 13.  I got a database I am working on and I need some help with something.

 

What I want to be able to do is have a number of check boxes with labels next to them and whenever I put a check in the box it will add digit one to another field on the same layout adding up as each time it's checked.

 

So for example, having students who come and attend a class I want to track how many times they came to class by clicking that checkmark.  Having it add the number of times I checked the box, totaling the days.

 

Hope I've explained it clearly enough.  Thank for your help!

Link to comment
Share on other sites

Post a copy or mockup of your file. Heres is a link that explains how to ATTACH A FILE.

 

BTW, some additional information about what you are trying to accomplish would be helpful.

 

Such as reports.

Are you interested in knowing the dates of attendance?

Can a Student attend the same class more then once a day?

 

How often are you wanting to see the numbers? Daily, weekly, monthly, quarterly, semiannually, yearly?

Link to comment
Share on other sites

I'd imagine you'd want a table of students and a related table for attendance. You'd click a button on the student record and it would create a related attendance record. This could include a date field too. Then you'd have a few options for displaying the total attendance, e.g. in the student table you'd have a calculated field: Count( attendance::ID )

Link to comment
Share on other sites

whenever I put a check in the box it will add digit one to another field on the same layout adding up as each time it's checked.

 

I don't think this is a good method. Checkboxes are fields - clicking a box adds/removes that value to the field. They are not meant to be used as buttons to generate contents for other fields. Not to mention that you would have to uncheck the value before you can check it again, and it would be really easy to get confused regarding having checked the box or not - causing data entry errors.

 

Besides that, attendance should be tracked by creating an individual record for each attendance (or absence) in a dedicated table - not by carving a notch on the wall like prisoners do.

 

 

See also:

http://fmforums.com/forum/topic/71739-copy-data-in-one-table-paste-in-record-of-another/#entry339358

Link to comment
Share on other sites

Hey everyone, thank you for your time.

 

This database is for a non-profit organization that offers programs within the community. (Not really a school, just the best example I could think up at the time).  They want to be able to track the number of people that come in to each program though the year.  To be able to print out stats that are quarterly and yearly.  To print out what programs had the most attendance.

 

So a client would come in for a program and we would open up the database and check a box to indicate their attendance.  It doesn't matter what days it was. 

 

So I am stuck at a point when I want to be able to put some check boxes then have it auto-populate in the field on the same page.  (I've included a screenshot of what I have so far.) 

 

I will include the database file once I get back to my desk.

 

Again thank you for your patience in tutoring a newbie :)

 

post-110683-0-06877600-1409165818_thumb.

Link to comment
Share on other sites

So a client would come in for a program and we would open up the database and check a box to indicate their attendance.  It doesn't matter what days it was.

 

I am not sure I understand this. So client X came in for program Y.  You have opened the database on program Y and checked client X. What happens when the same client X comes again for the same program Y on another day?

Link to comment
Share on other sites

When client X comes in another day, then we check off which program they came to and this adds to the number of days they have attended so far.  Which would populate in the dynamic field as indicated in the screenshot. 

 

I was thinking just adding buttons for us to click, have the buttons turn a different color once it is clicked.  Then have the click add as 1 to the number of days attended.  I know this is not the most efficient way to go about this but this is how the organization wants it layout out.

 

Any ideas?

Link to comment
Share on other sites

I am afraid I'm still not with you. Your screen shot shows the record of a client (I think). So suppose the client Darth Vader comes in for Settlement Counseling. You have found his record, and clicked the `Settlement Counseling` check box, turning it on. That was on Monday.

 

On Wednesday, Darth Vader comes in for Settlement Counseling again. You open his record - and the `Settlement Counseling` check box is still on. That's how a checkbox set works: it's a field that records the state of the checkboxes - it does not count the number of times they have been clicked.

 

 

Any ideas?

 

Have you looked at the demo I linked to in post #4 above?

Link to comment
Share on other sites

Ahh ok I guess I am a but confused with how checkboxes work.  I thought I could somehow have it where whenever someone checked the box, it would count the number of times it is checked and display that total...or thought I could somehow get that idea to work this way.

 

So using check boxes will not work in this way.  Is there a way I can have a button that whenever it is clicked it adds a count number which is displayed in a merge field on the same layout?  I would change the button so that when it is clicked it changes color.  Or do you have any idea on how I can better implement this?  Sorry for the confusion.  Maybe I should just upload the file and you have a look at it? And give me some pointers?

 

I did look at your examples and it's not exactly what I am looking for.  In a way, I think what I need would be something like an inventory sheet where I just click the button and each time it's clicked it adds the count of one to the total. (Ignore this last line if its too confusing lol...)

Link to comment
Share on other sites

Is there a way I can have a button that whenever it is clicked it adds a count number which is displayed in a merge field on the same layout?

 

That would be very easy to do - but there are two problems with it:

 

1. it does not leave a trail. It's very easy to click twice inadvertently. Or perhaps the clerk takes a sip of coffee then asks: "Did I click you in yet?". That's why it's best to create a record (literally) of admitting the person.

 

2. In your situation, where would you keep the count? You have client A enrolled into programs X and Y. And client B into programs X, Y and Z. That alone already requires 5 different counters, does it not?

Link to comment
Share on other sites

You are right merge field would not help at all.  Thanks for that. 

 

I have created fields for the different programs and created buttons where the clerk would just need to click on the button and have it populate 1 digit to the existing total digits in another field.

 

Ex. Field X has 10, button is clicked and total is now 11, click button again, total is 12 and so on...

 

I will have another layout where I will be able to get summaries of all the totals to these programs.

 

I guess now my question would be what script or function can I use to achieve this.  (Adding 1 digit to a total with each button click.)

 

About the clerk that takes a sip of coffee...Unfortunately, this is how they want this database designed.

 

Thanks for your time.

Link to comment
Share on other sites

Uhm, perhaps someone else can talk you out of it, it seems like I am not having any success...

 

 

About the clerk that takes a sip of coffee...Unfortunately, this is how they want this database designed.

 

I don't think it's their say. They can ask for a user interface where the clerk clicks a button labeled "Settlement Counseling" in order to admit the currently selected client. What happens behind the scenes when the button is clicked is not their concern, but yours. And what should happen when the clerk clicks the button for a second time is an error message: "You have already admitted John Smith into Settlement Counseling today.".

Link to comment
Share on other sites

I'd imagine you'd want a table of students and a related table for attendance. You'd click a button on the student record and it would create a related attendance record. This could include a date field too. Then you'd have a few options for displaying the total attendance, e.g. in the student table you'd have a calculated field: Count( attendance::ID )

Link to comment
Share on other sites

This topic is 3539 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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