Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
38 replies
Subscribers
5 subscribers
Views
11672 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
Hi all, we are already defining a expression rule by using a doforeach ex
natasav
over 9 years ago
Hi all,
we are already defining a expression rule by using a doforeach expresion. Now we need to redefine it because tis plug is deprecated.
By simple changing it with apply () it does not work.
Could somebody help me with redefinition on it.
Here is the rule:
=if(count(rule!Display_Harm_Details_CDT(pv!ContractDetails.Contract_Serial_Number)),"<br> <i> <b> Contract Harmonization History: <br><br></b> </i> "&ncolumntablestyled( "CCCCCC","FFFFFF", "FFFFFF", {"Version","Harmonization Members","Folder"},rule!ListofVersion_CR(pv!ContractDetails.Contract_Serial_Number),doforeach("AllHarmonizationMembesforVersion",pv!ContractDetails.Contract_Serial_Number,rule!ListofVersion_CR(pv!ContractDetails.Contract_Serial_Number)),doforeach("rule!LinktofolderfromfolderID",pv!ContractDetails.Contract_Serial_Number,rule!ListofVersion_CR(pv!ContractDetails.Contract_Serial_Number))),"")
The problem is when rule!ListofVersion_CR(pv!ContractDetails.Contract_Serial_Number) ret...
OriginalPostID-161216
OriginalPostID-161216
Discussion posts and replies are publicly visible
0
natasav
over 9 years ago
...urn an array.
BR,Natasa
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
natasav
over 9 years ago
Whe I just replace doforeach with apply following error appear on dasboard:
com.appiancorp.process.expression.ExpressionEvaluationException: The expression function 'apply([type 88, value rule!AllHarmonizationMembesforVersion],"C0191/2013",{"0.1","0.2"})' (user=testo10) could not be evaluated: Expression evaluation error : Array is expected as second parameter, but received: C0191/2013.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
natasav
over 9 years ago
Then I replaced like this:
=if(count(rule!Display_Harm_Details_CDT(pv!ContractDetails.Contract_Serial_Number)),"<br> <i> <b> Contract Harmonization History: <br><br></b> </i> "&ncolumntablestyled( "CCCCCC","FFFFFF", "FFFFFF", {"Version","Harmonization Members","Folder"},rule!ListofVersion_CR(pv!ContractDetails.Contract_Serial_Number),apply(rule!AllHarmonizationMembesforVersion,{pv!ContractDetails.Contract_Serial_Number},rule!ListofVersion_CR(pv!ContractDetails.Contract_Serial_Number)),apply(rule!LinktofolderfromfolderID,{pv!ContractDetails.Contract_Serial_Number},rule!ListofVersion_CR(pv!ContractDetails.Contract_Serial_Number))),"")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
natasav
over 9 years ago
But still errors. Any help will be appreciated.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 9 years ago
Quite hard to debug without being able to run the function, but try this:
=if(
count(rule!Display_Harm_Details_CDT(pv!ContractDetails.Contract_Serial_Number)),
"<br> <i> <b> Contract Harmonization History: <br><br></b> </i> "&ncolumntablestyled(
"CCCCCC",
"FFFFFF",
"FFFFFF",
{"Version","Harmonization Members","Folder"},
rule!ListofVersion_CR(pv!ContractDetails.Contract_Serial_Number),
apply(
rule!AllHarmonizationMembesforVersion,
merge(
pv!ContractDetails.Contract_Serial_Number,
rule!ListofVersion_CR(pv!ContractDetails.Contract_Serial_Number)
)
),
apply(
rule!LinktofolderfromfolderID,
merge(
pv!ContractDetails.Contract_Serial_Number,
rule!ListofVersion_CR(pv!ContractDetails.Contract_Serial_Number)
)
)
),
""
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 9 years ago
If that doesn't work, could you post the inputs for rule!AllHarmonizationMembesforVersion and rule!LinktofolderfromfolderID ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
natasav
over 9 years ago
Again error: ",if(count(rule!Display_Harm_Details_CDT(pv!ContractDetails.Contract_Serial_Number)),"
Contract Harmonization History:
</i"&ncolumntablestyled("CCCCCC","FFFFFF","FFFFFF",{"Version","Harmonization Members","Folder"},rule!ListofVersion_CR(pv!ContractDetails.Contract_Serial_Number),apply(rule!AllHarmonizationMembesforVersion,merge(pv!ContractDetails.Contract_Serial_Number,rule!ListofVersion_CR(pv!ContractDetails.Contract_Serial_Number))),apply(rule!LinktofolderfromfolderID,merge(pv!ContractDetails.Contract_Serial_Number,rule!ListofVersion_CR(pv!ContractDetails.Contract_Serial_Number)))),""),"
"). com.appiancorp.process.expression.ExpressionEvaluationException: The expression function 'merge("C0191/2013",{"0.1","0.2"})' (user=testo10) could not be evaluated: Only list arguments are allowed
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
natasav
over 9 years ago
All Harmonization Member:
="<b>"&tostring(rule!getFullnames(rule!HarmonizationDetailswithVersion({ri!ContractSN},ri!Version)[1].HarmonizationMembers))&"</b>"
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
natasav
over 9 years ago
rule!HarmonizationDetailswithVersion that is a Query rule.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
natasav
over 9 years ago
rule!LinktofolderfromfolderID :
="<a href='
es-sk-bpmsprod:8443/.../"
&rule!HarmonizationDetailswithVersion(ri!ContractSN,ri!Version).FolderID & "' target='_new'>Access Documents</a>"
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>