If statement help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kerry Weiland
    New Member
    • Feb 2012
    • 1

    If statement help

    Very green at livecycle. I have been trying to figure this out for too long now. Please help.

    Employee_5X is a dropdown of employee names
    Employee_5X_Sta rt is a dropdown of start times
    Employee_5X_End is a dropdown of end times
    Employee_5X_Lun ch is a dropdown of lunch deduction times
    Employee_5X_Tot al is the calculated total number of hours worked for the day.

    If Employee_5X is blank, i want Employee_5X_Tot al to show 0 or be blank as well. Here is one of the ways i have tried to do it. I have tried java as well, but I am loosing my hair.

    Code:
    if (Employee_5X.isNull)then
    Employee_5X_Total ==0
    else
    sum (-Employee_5X_Start.rawValue + Employee_5X_End.rawValue + (-Employee_5X_Lunch) + 12)
    endif
    Any help is appreciated
    Last edited by gits; Feb 16 '12, 09:08 AM. Reason: added code tags
  • Dave0291
    New Member
    • Jan 2012
    • 33

    #2
    The "=="is a comparator not an assignment operator. The "=="is used in a case where your comparing such as (if x == y). Try this:
    Code:
    Employee_5X_Total =0

    Comment

    Working...