Rule name is available (retrieved from DB ) in as pv!integration.mappingRule.I am trying to run this rule in Node output expression rule
I have tried various options like
rule!pv!integration.mappingRule
or
rule!eval(pv!integration.mappingRule)
eval(rule!pv!integration.mappingRule )
None of them works . Any idea , how to make this work? Thanks in advance.
Discussion posts and replies are publicly visible
May I ask what you want to achieve?
BTW, eval() is a not supported private function and should not be used.
Thanks Stefan Helzle, I am aware that eval is an internal function. I couldn't find another way though. We are trying to execute dynamic rules here. This implementation supports number of countries with each country has a different mapping rule. Hope that makes sense.
Your best bet is to create a mapping rule in Appian that calls the rule that corresponds to whatever text value you store in the database. For instance:
choose( wherecontains( ri!ruleName, {"ruleOne", "ruleTwo", "ruleThree"} ), rule!ruleOne, rule!ruleTwo, rule!ruleThree )
Please do not use the eval function - it is undocumented, unsupported, and is not guaranteed to behave in the manner you want or expect.
Thanks a lot Peter Lewis. worked like a charm !!