Logo
For example "scheduled tasks"
Search
Info
Content
Category Navigation
  • 🎯  Solution Guides

  • Low Code Solutions

    Add "Tabs" to your app

    ID Target Link

    Use an address field to display a static street view thumbnail

    Turn your menu into a fixed menu

    Auto close mobile menu

    Display record information in a card

    How to add a back button to your app

    Add a collapsible accordion element to your app

    Code Snippets

    PHP Curl Create New Record

    PHP Get Records With Filters

    Google Scripts - Get record and create new records from connected table

    Save Tables and Fields into Spreadsheet

    Google Scripts - Export all records

    Webhook to save deleted records

    Send Messages to Slack

    Restrict Space and Force Uppercase in a Form

    Building Advanced Features

    Use Validation Rules to Ensure Unique Votes Per User

    Use Record Rules to Create an Audit Log

    Track current inventory with transactions

    Schedule Bookings and Prevent Double Bookings

    Create orders with multiple items and varying quantities

    2 Step Forms

    Unique Record Validation

    Restrict Editing Records to Record Owners

    Sum date/time field

    Duplicate Records

    Advanced App Customization

    How to embed a Tadabase page on another website

    Adding external fonts

    Custom Favicon

    Making apps mobile friendly

    Show date/time as a countdown

    Importing many images at once

    Adding QR Codes

    Adding charts to PDFs

    Customizing your app shortcut for mobile phones

    Animate parts of a page

    Design Customization

    Changing background colors

    Set background colors to the edge of a page

    Change the background of a column

    Add padding around a component

    Using an image as background for a page

    Adding a background image to a row, column, or component

  • Duplicate Connected Records

Categories
🎯 Solution Guides
Building Advanced Feat...
Sum date/time field

Sum date/time field

In this article, we will go over how to use the Date and Basic Formula field to sum all connected records with a complex formula.

 

We'll use an example to demonstrate this. In our example, we have a simple time tracking app where users can log in, enter a start and end time, and see the total time spent.

To get started, all we need is to add one table with 5 fields. In this example, we'll call the table Time Stamps.

 

s3XF6Aus5YHFeKEvPNyvScS9o5BS4_QpFQ.png

 

As you can see in the image above there are 5 fields added to the table.

  1. Start Time (Date/Time Field)
  2. End Time (Date/Time Field)
  3. Total Hours Worked (Date Formula)
  4. Basic Formula - Hours Worked (Basic Formula)
  5. Assigned to (Connection)

 

1 & 2. Start Time & End Time (Date/Time Field)

These can be added by hovering over the Date option and then select Date & Time

esX8a5hzBB6rSkB4H8_JiOZuj7h7Twaz0Q.png

3. Total Hours Worked (Date Formula)

This field will be used to calculate the time spent on one record (End Time minus Start Time)

gVjfa5Ec8Y94qJyn80QNW0XJxOSlkMelkg.png

 

4. Basic Formula - Hours Worked (Basic Formula)

This field is important because we need it to be able to SUM all records connected to the logged-in user.

 

We'll need to select the Date Formula field (in hours) as shown in the image below.

cbvrRM0v4K-GBQRfVmUPV9C1mVSOFQZgAQ.png

 

5. Assigned to (Connection)

This is our connection field to the user's table (One Time Stamp to One User) so that we can know which timestamp belongs to which user.

 

Q7OXsravV_BHIGvyUwkFVJuaY59socD4FQ.png

 

Now that we have our Time Stamps table all set up we can now head over to the default User's table and add a Complex (Sum) Formula

 

3curW1i1Nyir0DUtcNMNJvQxBZIVSqczrw.png

 

We want this complex formula to sum the total amount of hours for each user so we'll confirm that (1) The formula Function is "Sum Value" (2) The table selected is "Time Stamps (Assigned to) and (3) The Value Field is "Basic Formula - Hours Worked"

LRPuT6gl_tF6NRPuXq5uHh5dIS9Us4uxTw.png

 

Now on our page builder, we can add (1) a form that will add a timestamp (2) a table that will display all of the user's timestamp and (3) a card component that will display the total amount of time

r7ha3k4QXNj-v6S9qfGY7W5LwjqDBCHCzw.png

 

You can also add (3) as an HTML component as shown in the image below. 

uuEFmvKbU8tdKSDuVRnQlPRRuLRUEbYzNw.png

How did we do ?

Previous Article
Restrict Editing Records to Record Owners
Next Article
Duplicate Records
Back to top
API
100% Operational
Apps
100% Operational
Builder
100% Operational
Overall Status
100% Operational