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
4 replies
Subscribers
7 subscribers
Views
2388 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Is it possible to map parts of one data entity into parts of another data entity
ashleyb
over 10 years ago
Is it possible to map parts of one data entity into parts of another data entity within an expression rule?
I'm attempting to do so using the with{} function but receive a syntax error each time.
Has anyone else done something similair to this outside of a process node? Am wanting to use the expression rule to attempt to make the entities as dynamically updated as possible.
with(
local!entity1: rule!getEntity1FromDB(ri!id),
local!entity2: rule!getEntity2FromDB(ri!id),
local!entity1.fieldOne : local!entity2.fieldTwo,
local!entity1.fieldTwo : local!entity2.fieldFour,
local!entity1
)
Thanks in advance!
OriginalPostID-163769
OriginalPostID-163769
Discussion posts and replies are publicly visible
Parents
0
Jorge Sanchez
Appian Employee
over 10 years ago
You can use the dictionary syntax. For example:
ExpressionName: getMyNewType
inputs:
myCDT1 (Any Type),
myCDT2 (Any Type)
...
Definition: ={
cdt1: ri!myCDT1,
cdt2: ri!myCDT2,
anotherThing: "This is something else
}
Use:
with(
local!mergedData: rule!getMyNewType(cdt1, cdt2),
local!mergedData.cdt1.id
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Jorge Sanchez
Appian Employee
over 10 years ago
You can use the dictionary syntax. For example:
ExpressionName: getMyNewType
inputs:
myCDT1 (Any Type),
myCDT2 (Any Type)
...
Definition: ={
cdt1: ri!myCDT1,
cdt2: ri!myCDT2,
anotherThing: "This is something else
}
Use:
with(
local!mergedData: rule!getMyNewType(cdt1, cdt2),
local!mergedData.cdt1.id
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data