Quantcast
Channel: Ivanti User Community : Popular Discussions - All Communities
Viewing all articles
Browse latest Browse all 2325

I have added calculation to show a dropdown based on value selected in another dropdown. This is giving me error.

$
0
0

Hi,

 

I have added calculation to show a dropdown based on value selected in another dropdown. This is giving me error. Below is the  calculation script.

 

import System

static def GetAttributeValue(Incident):

     HideCI = true

     Mandatory = false

     if  Incident._Project._Title.StartsWith("JIRA"):

          HideCI = false

          Mandatory = true

          return String.Format(":SetHidden(_JIRAProject,{0});:SetMandatory(_JIRAProject,{1});",HideCI,Mandatory)

     else:

          HideCI = true

          Mandatory = false

          return String.Format(":SetHidden(_JIRAProject,{0});:SetMandatory(_JIRAProject,{1});",HideCI,Mandatory)

 

While opening the New Incident screen I am getting the below error:

 

There has been an unexpected error. Click Continue to return to the previous page.

Exception has been thrown by the target of an invocation.

 

Below are the details of the error:

at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

   at Touchpaper.Framework.Data.DefaultCalculationStrategy.Calculate(DataObjectProxy proxy, MethodInfo methodInfo, IAttributeType attributeType)

   at Touchpaper.Framework.Data.Calculator.DoCalculation(IDataObject dataObject, IAttributeType attributeType)

   at Touchpaper.Framework.Data.DataObjectCalculator.CalculateOnDemand(IDataObject dataObject, String attributeName)

   at Touchpaper.Web.Console.Controllers.ObjectController.InvokeFormFunctions(ICollection`1 formFunctionAttributes, IDataObjectCalculator calculator, IDataObject dataObject, ObjectForm form)

   at Touchpaper.Web.Console.Controllers.ObjectController.PopulateFormFunctionCalculatedFields(IDataObject dataObject, ObjectForm form)

   at Touchpaper.Web.Console.Controllers.ObjectController.CreateObject()

   at lambda_method(Closure , ControllerBase , Object[] )

   at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)

   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)

   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.b__33()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.b__36(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<>c__DisplayClass2a.b__20()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.b__22(IAsyncResult asyncResult)

 

Inner Exception: - Object reference not set to an instance of an object.
   at System.Object.GetType()
   at Boo.Lang.Runtime.RuntimeServices.Dispatch(Object target, String cacheKeyName, Type[] cacheKeyTypes, Object[] args, DispatcherFactory factory)
   at Boo.Lang.Runtime.RuntimeServices.Dispatch(Object target, String cacheKeyName, Object[] args, DispatcherFactory factory)
   at Boo.Lang.Runtime.RuntimeServices.GetProperty(Object target, String name)
   at TestModule.GetAttributeValue(Object Incident) in c:\windows\system32\inetsrv\Test:line 6 

 

Please help me to resolve this issue.

 

Thanks

Sriram


Viewing all articles
Browse latest Browse all 2325

Trending Articles