Quantcast
Channel: Ivanti User Community : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 15294

Dynamic Calculation

$
0
0

Can someone take a look at this to tell me if there is something wrong?

 

import System

static def GetAttributeValue(_Scheduling):

    IsMandatory = false

   

    LatestSchedule = _Scheduling._Change._SchedulingCol.Latest()

   

    if LatestSchedule != null and  _Scheduling._Type == 'Migration Resource':

        IsMandatory = true       

    return String.Format(":SetMandatory(_RequiredByDate, {0});:SetMandatory(_StartTime,{0});:SetMandatory(_EndTime,{0});", IsMandatory)

 

 

What I need to do is I have a collection called Scheduling.  There are actions throughout the workflow where this is triggered.  For each time it's selected, there is a different Type added which is hardcoded and the field is hidden.  I need to set 3 fields on the form to mandatory when it finds a Type of Migration Resource.  When I try this on a ticket I know it should render as true, ALL options are showing False.  So the 'if' statement is not reading true.

 

Am I missing something?  A second set of eyes never hurts.


Thanks,


Viewing all articles
Browse latest Browse all 15294

Trending Articles