Summary Calculation Updating a Single Field

Tap Forms Database Pro for Mac, iPhone, iPad and Apple Watch Forums Using Tap Forms 5 Summary Calculation Updating a Single Field

Viewing 3 reply threads
  • Author
    Posts
  • June 12, 2017 at 10:41 AM #23500

    Connor Hoffman
    Participant

    Hello All,

    I am newer to Tap Forms and currently really enjoying the functionality on the ios version.

    I am working on a project where points based on a sale value are collected over time per customer for a loyalty/rewards program. The goal is to use the calculation fields in a way where the price of the purchase on the day is entered and that price is converted into a point value (completed this part!). The point value then can be stored and summed to all previous point values accumulated for that individual. So if Susie spent $100 last week and $25 this week, the $100 would have been entered in the purchase value field the first time and $25 the second, I am struggling to find a method to store the previous point values and sum those with the point value gained on the most recent day of purchase. Any input is greatly appreciated!

    June 13, 2017 at 10:10 AM #23505

    Brendan
    Keymaster

    Hi Connor,

    It sounds like you might need to link to a separate form in order to accumulate the different point values entered and their corresponding dates. Tap Forms can then total up the point values in the linked form. So you would want to setup 2 forms. One with your Customer data and another with their Points data. Set it up as a one-to-many Link Type. Then add the Link to Form field on your Customer form to link to the Points form. Enable the Show Inverse Relationship option on the Link to Form field on your Customer form. Then on your Points form add a Points and a Date field. Then set the Calculation Type and Calculation Field on the Points form to be the Points field.

    Now when you are looking at an individual Customer record, you can add multiple Points records to the Points Link to Form relationship. Tap Forms will display the total below the list of points accumulated by that Customer.

    Hope that gives you an idea of what you can do.

    Thanks,

    Brendan

    June 15, 2017 at 1:02 PM #23530

    Connor Hoffman
    Participant

    This was really helpful, I now have just a few more questions regarding the calculations fields. When using the total sum in a different calculation [Total::Points Form::Points Earned] it wont allow this to be used in a calculation within the same calculation field rather defaulting to [Total::New Field::New Field]. The reason I want to be able to evaluate the current value prior to adding the points for a purchase on the day is that I could use an IF statement to constrain the number of points added to stop at one of the point tier values where the customer receives an award. I also wonder if I can use the [Total::Points Form::Points Earned] combined with $now in order to specify only the points registered on todays date when performing a different calculation on the primary form where the consumer data is located. the assistance is greatly appreciated!

    Thanks,
    Connor

    June 15, 2017 at 1:35 PM #23531

    Brendan
    Keymaster

    Hi Connor,

    I’m not sure I understand this:

    it wont allow this to be used in a calculation within the same calculation field rather defaulting to [Total::New Field::New Field].

    What do you mean by this?

    The $now or NOW() function will simply insert the current date in terms of the number of seconds that have elapsed since January 1, 1970 00:00:00 GMT. So I don’t know if that’s what you are looking for.

Viewing 3 reply threads

You must be logged in to reply to this topic.