Quantcast
Channel: Ivanti User Community: Message List
Viewing all articles
Browse latest Browse all 12704

dynamic window calculation, can't detect null on category?

$
0
0

Unless I am missing something obvious, I can't get a window calculation to be able to detect a null value on Catagory (within my HR module).

 

1. this window calculation works flawlessly, until the user chooses "clear selection" the category dropdown.

2. this happens even if i simplify the calculation to ONLY check for a null on activity category.

3. this is on my HR module, not sure if that makes a difference.

 

note: action category = OOTB category field

 

thanks

 

error 1.PNG

 

error 2.PNG

 

======================

 

import System

static def GetAttributeValue(Activity):

    Value = ''

   

    NoticeFlag = false

   

    TermDateMand = false

    LastDayMand = false

    RehireMand = false

    NoticeGivenMand = false

    NoticeLengthMand = false

    TermDateRead = false

    LastDayRead = true

    RehireRead = true

    NoticeGivenRead = true

    NoticeLengthRead = true

    TermDateHide = false

    LastDayHide = false

    RehireHide = false

    NoticeGivenHide = true

    NoticeLengthHide = true

   

    if Activity.Category != null:

        TermDateMand = true

   

    if Activity.Category != null:

        if Activity.Category.FullName == 'Warning Written':

            TermDateMand = true

            LastDayMand = false

            RehireMand = false

            TermDateRead = false

            LastDayRead = true

            RehireRead = true

            TermDateHide = false

            LastDayHide = true

            RehireHide = true

       

    if Activity.Category != null:

        if Activity.Category.FullName == 'Warning Verbal':   

            TermDateMand = true

            LastDayMand = false

            RehireMand = false

            TermDateRead = false

            LastDayRead = true

            RehireRead = true

            TermDateHide = false

            LastDayHide = true

            RehireHide = true

 

    if Activity.Category != null:

        if Activity.Category.FullName == 'Termination Voluntary':   

            NoticeFlag = true

            TermDateMand = true

            LastDayMand = true

            RehireMand = true

            TermDateRead = false

            LastDayRead = false

            RehireRead = false

            TermDateHide = false

            LastDayHide = false

            RehireHide = false

 

    if Activity.Category != null:

        if Activity.Category.FullName == 'Termination Involuntary':   

            TermDateMand = true

            LastDayMand = true

            RehireMand = true

            TermDateRead = false

            LastDayRead = false

            RehireRead = false

            TermDateHide = false

            LastDayHide = false

            RehireHide = false

 

    if Activity.Category != null:

        if Activity.Category.FullName == 'Suspension':   

            TermDateMand = true

            LastDayMand = false

            RehireMand = false

            TermDateRead = false

            LastDayRead = false

            RehireRead = true

            TermDateHide = false

            LastDayHide = false

            RehireHide = true

 

    if NoticeFlag == true:

        NoticeGivenMand = true

        NoticeGivenRead = false

        NoticeGivenHide = false

        NoticeLengthMand = false

        NoticeLengthRead = true

        NoticeLengthHide = false

        if Activity._EmpNoticeGiven != null:

            if Activity._EmpNoticeGiven == true:

                NoticeLengthMand = true

                NoticeLengthRead = false

   

    Value = Value + ':SetMandatory(_DateEmpNotified,' + TermDateMand + ');'

    Value = Value + ':SetMandatory(_DateEmpLastWork,' + LastDayMand + ');'

    Value = Value + ':SetMandatory(_RehireEligible,' + RehireMand + ');'

    Value = Value + ':SetMandatory(_EmpNoticeGiven,' + NoticeGivenMand + ');'

    Value = Value + ':SetMandatory(_EmpNoticeLength,' + NoticeLengthMand + ');'

   

    Value = Value + ':SetReadOnly(_DateEmpNotified,' + TermDateRead + ');'

    Value = Value + ':SetReadOnly(_DateEmpLastWork,' + LastDayRead + ');'

    Value = Value + ':SetReadOnly(_RehireEligible,' + RehireRead + ');'

    Value = Value + ':SetReadOnly(_EmpNoticeGiven,' + NoticeGivenRead + ');'

    Value = Value + ':SetReadOnly(_EmpNoticeLength,' + NoticeLengthRead + ');'

   

    Value = Value + ':SetHidden(_DateEmpNotified,' + TermDateHide + ');'

    Value = Value + ':SetHidden(_DateEmpLastWork,' + LastDayHide + ');'

    Value = Value + ':SetHidden(_RehireEligible,' + RehireHide + ');'

    Value = Value + ':SetHidden(_EmpNoticeGiven,' + NoticeGivenHide + ');'

    Value = Value + ':SetHidden(_EmpNoticeLength,' + NoticeLengthHide + ');'

 

    return Value


Viewing all articles
Browse latest Browse all 12704

Trending Articles