Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

calculating time problem

Featured Replies

I have two tables: Table A and Table B. Table A contains information about a television program, whereas Table B contains the shot schedule for the program. Table B is represented in a portal row within Table A.

 

I am having an issue calculating time. I have a field in Table A (total time scheduled) that uses the following calculation:

Sum(Table B::duration) *unstored*

Total Time Scheduled is formatted as time and Duration is formatted as text. The duration field in Table B needs a little flexibility so I have it as a text field (time wouldn't let me enter just seconds without zeros preceding the seconds). For example, if the shot is only thirty seconds, the user enters :30. If the shot is one minute, the user enters 1:00. If the shot is one hour (very unlikely, but I'd like them to have this option) then the user would enter 1:00:00. The calculation works properly if the duration entered is under 1 minute, but if 1 minute or greater is entered the Total Time Scheduled starts displaying bizarre results, usually adding an additional 40 seconds.

 

Additionally, in table A the user has to enter the anticipated start time of the show in a field called "Start Time" (time) and Total Time Scheduled is added to Start Time to give the user an estimated end time.

 

Can someone point me in the right direction here? Thanks :)

Please use actual names for your tables, fields, layouts, script, etc. or attach a copy of, or a mockup of, your file.

 

This sometimes help us to understand logic of your question. Using names such as table A table and B get in the way of this. Even better, would be to attach a copy or a mockup of your file.

 

Lee

 

BTW, if you’re not sure of how to attach a file just follow the steps you’ll find in this thread, Attached File

Edited by Lee Smith
change the wording to sound better

Duration is formatted as text.

 

You cannot sum text values expressing (in your mind) a duration in any meaningful way. Either define the Duration field as a Time field, and solve the data entry issue using auto-enter calculations and/or script triggers, or define a calculation field in the Shots ("B") table with a Time result type and sum that.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.