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

Calculation for isParent not returning a value...

$
0
0

I have created 4 new Attributes on my Incident window, all of which have calculations on

 

Child Count - to count the number of Child Incidents

isParent? - a boolean, which should be set to "true" if there is more than 0 children

Parent Count - to count the number of Parent Incidents

isChild? a boolean, which should be set to "true" if there is more than 0 parents

 

I have a couple of issues

 

1) Neither of the isParent? or isChild? attributes are displaying correctly (i.e. when they are made a parent or child the check box doesn't enable even though the count is working)

 

import System

static def GetAttributeValue(Incident):

     if Incident._ParentCount >0:

          return true

     else:

          return false



The Syntax shows no errors, but the attribute doesn't update.  Attribute properties are below. (assume the same for the isParent? attribute)



  Capture.JPG



2)  My second issue is that my Parent/Child Count queries only increase, if a parent or child is detached then the counts don't decrease.  Do I need to add another calculation on the Process Action for Detach Parent/Child to remove as required?



Fairly new to calculations so please be gentle!






Viewing all articles
Browse latest Browse all 15294

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>