Avatar of Cartillo
Cartillo
Flag for Malaysia asked on

Build error

Hi Experts,

I would like to request Experts help. The attached script shows error as "Build error". Hope Experts could help me to fix this error.
Imports MyCompany.Data
Imports System
Imports System.Collections.Generic
Imports System.Data
Imports System.Linq
Imports System.Text.RegularExpressions
Imports System.Web

Namespace Rules
    
    Partial Public Class DataBusinessRules
        Inherits MyCompany.Rules.SharedBusinessRules
        
        <ControllerAction("Data", "Calculate", "Total_Duration")>  _
        Public Sub CalculateData(ByVal data_ID As Nullable(Of Integer), ByVal [date] As Nullable(Of DateTime), ByVal task As String, ByVal timeIN As Nullable(Of System.TimeSpan), ByVal timeOUT As Nullable(Of System.TimeSpan), ByVal total_Duration As Nullable(Of System.TimeSpan))
            UpdateFieldValue("Total_Duration", (datediff(HOUR,[TimeIN],[TimeOUT])))
        End Sub
    End Class
End Namespace

Open in new window

VB ScriptVisual Basic.NET

Avatar of undefined
Last Comment
Cartillo

8/22/2022 - Mon
Todd Gerbert

What is the error and on what line?
Cartillo

ASKER
Hi,

Here's error message that I got:

Error      1      Argument not specified for parameter 'TimeValue' of 'Public Function Hour(TimeValue As Date) As Integer' at line 16.
ASKER CERTIFIED SOLUTION
Todd Gerbert

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Cartillo

ASKER
Hi tgerbert,

Thanks for the fix. However when I add the time value at TimeIN and TimeOUT column, the Total_Duration columns was not returned with total duration (sum) as suppose to. How to get the value automatically update the Total_Duration column?
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Cartillo

ASKER
Hi,

Thanks for the help