I am having problems writing an expression rule that uses displayvalue() functio

I am having problems writing an expression rule that uses displayvalue() function.

I have an array CDT called BusinessRulesCDT. It keeps erroring out complaining about the 4th argument to displayvalue() which is the default value.

At run time, it gives the error message:

Details: ERROR:An error occurred while evaluating expression: businessRule:rule!findBusinessRuleCDT(pv!businessRuleArray, pv!ruleName,pv!defaultBusinessRule) (Expression evaluation error in rule 'findbusinessrulecdt' at function 'displayvalue' parameter 4: ) (Data Outputs)

My BusinessRuleCDT is:
- id (integer)
- name (text)
- value (text)

my expression rule is:

findBusinessRuleCDT(businessRuleArray (Any Type), ruleName (Text), defaultBusinessRule (Any Type))
which calls ==> displayvalue(ri!ruleName, ri!businessRuleArray.name, ri!businessRuleArray, ri!defaultBusinessRule)

For the 4th parameter, I tried {}, "", and even the example above where I pass ...

OriginalPostID-170427

OriginalPostID-170427

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    I also get the appropriate results when testing the expression in isolation. As with vahluwalia, this leads me to believe that the issue must exist with the way you are calling the rule - namely the default value. What is the value of ri!defaultBusinessRule you are passing in? Are you just trying to pass in an empty CDT or does this have actual default value?
Reply
  • 0
    Certified Lead Developer
    I also get the appropriate results when testing the expression in isolation. As with vahluwalia, this leads me to believe that the issue must exist with the way you are calling the rule - namely the default value. What is the value of ri!defaultBusinessRule you are passing in? Are you just trying to pass in an empty CDT or does this have actual default value?
Children
No Data