4 Replies Latest reply on Oct 16, 2014 9:13 AM by robertjordan

    easy question i'm sure...

    robertjordan

      Title

      easy question i'm sure...

      Post

      I am new to FileMaker and I'm sure this is an easy question,

      I have 7 fields, TransferedDays, sickT, sickE, LapseE, PersonalT, Absent and Jury.

      I have a Balance field, I want to take the number in the TransferedDays field and have it add to the Balance Field when there is something in the TransferedDays Field, otherwise move on.

      Then I want to take any number entered into the remaining six fields ( some fields might not be entered into) and subtract that from the balance if there is something entered into them.

      So my balance field keeps a running total each time data is entered, I have a button with a script to create a record on another table and show every entry in a portal as well, that works great! 

      Be nice if i could hit the button to enter the record and clear the above fields in the same process, not sure if that's possible.

      I'm sure it is easy, but i can wrap my head around what to do! any help or thoughts would be greatly appreciated! 

        • 1. Re: easy question i'm sure...
          philmodjunk

          Then I want to take any number entered into the remaining six fields ( some fields might not be entered into) and subtract that from the balance if there is something entered into them...that works great!

          So you can get the running total that you want? let me know if this is not the case.

          A button can run a script to clear all the fields in the current record:

          Set field [ YourTable::TransferedDays ; "" ]
          Set field [ YourTable::sickT ; "" ]
          Set field [ YourTable::sickE ; "" ]
          Set field [ YourTable::LapseE ; "" ]
          Set field [ YourTable::PersonalT ; "" ]
          Set field [ YourTable::Absent ; "" ]
          Set field [ YourTable::Jury ; "" ]

          Note: When Setting up Set Field, there are two Specify buttons that must be clicked. To get Set Field [Table::Field ; Expression], add set field to your script and click the first button (specify target field). Select Table::Field from the list of fields. Do not click the specify button next to the repetition box. Click OK to close this dialog box. Now click the lower specify button (calculated result) and create the expression to the right of the semicolon (;). Do not try to type in the semicolon.

          • 2. Re: easy question i'm sure...
            robertjordan

            No i cannot get a running total, Scratch this part -  that works great!

            • 3. Re: easy question i'm sure...
              philmodjunk

              Define a calculation field cBal as

              TransferedDays- sickT - sickE - LapseE - PersonalT - Absent - Jury

              Define a running total summary field to compute the total of cBal

              This is an adaptation of the method used here: https://dl.dropboxusercontent.com/u/78737945/AccountingLedger.fmp12

              Caulkins Consulting, Home of Adventures In FileMaking

              • 4. Re: easy question i'm sure...
                robertjordan

                I have been trying to implement what you posted above, I have having problems with the sBalance holding the value after committing the record.
                I am going to attach my file, it is probably messed up now since I was try to incorporate the example that you linked.

                Basically what I am shooting for is having a user record that has multiple entries for each record created for that user show up in the portal below. I like that gSelectAccount dropdown and it would be nice to be able to select users to view and enter sick or personal leave etc..

                I want to enter in any Transferred Days and have that add to a running balance, all the while creating a individual record to keep a running list of modifications (the portal) but keep the running balance in the balance_total field to keep up with the overall balance. So if the user has 230 Transferred days entered in when they are hired, and then they take a sick day (1) the new running balance is 229, if they have something in the sick earned field then it would add to the running balance.

                File Here 

                Sorry for the mess as I am new to FileMaker and learn a lot by trying!