Calculated Field

Using the Events Module I setup an event with a start time and end time. I need to have the duration in minutes filled out from those two selections. How can that be accomplished? I’ve tried a workflow but can’t seem to get a calculated field in workflow working.

I’m using suiteCRM 7.8.5 LTS.

Where do you need it to be shown as calculated? Does it have to be in the database, in a custom field, or is it enough to show on some screen? Sometimes it’s easier to just customize one of the views with some simple PHP.

I need to be able to have it show up on a PDF generated from a PDF template. So if that means a bit of code during generation to calculate it we can start there. :slight_smile:

Actually I think that’s the easiest place to change things, because I think I know the place in the code where that can be done when the variables are being replaced.

https://github.com/salesagility/SuiteCRM/blob/master/modules/AOS_PDF_Templates/generatePdf.php

Good luck and please come back here and share your solution when done.