Calculating total time Automatically

kolaboy
kolaboy Member Posts: 446
Hi Dear,
I created colums for time In and Time Out and Total time.
Now my problem is how can i have the totals calculated automatically in the Total time Column each time the time in and time out are updated.
Please can anybody help to explain this for me.
Thanks

Comments

  • Mbad
    Mbad Member Posts: 344
    Create a function that is called on both OnValidate triggers and fill out the total there. Remember to validate the inputs.
  • kolaboy
    kolaboy Member Posts: 446
    Mba,
    Can you please give me an example of the function you are talking about.
    I want to comfirm it.
  • cunny
    cunny Member Posts: 129
    Try this,

    function@Caltotaltm, Code:
    "total time" :=("time out" - "time in")/3600000; //Showing in hour

    Add the code
    IF "time out" <>0T THEN
    Caltotaltm;
    into Onvalidate() trigger of field "time in" and Caltotaltm; to Onvalidate() trigger of field "time out"

    hope you find it useful.
    cunny Lee
    MCP - MBS Navision
    jle@naviworld.com