Is it possible to map parts of one data entity into parts of another data entity

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
  • Hello Jorge! I'm struggling a bit with implementing this. I understand the data dictionary but not fully on how it would allow me to map parts of cdt2 into parts of cdt1. The end goal would be to return the full entity of cdt1 with the updated fields, not just the updated fields. Also to note I will need to be updating around 10 fields.

    Is this possible in Appian ? Is there somewhere I can read up on this topic more? Any further explanation is greatly appreciated.

    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) **Both entites have fields that aren't being used, but in the end I will need to return the entire entity with the updated and non updated fields.
Reply
  • Hello Jorge! I'm struggling a bit with implementing this. I understand the data dictionary but not fully on how it would allow me to map parts of cdt2 into parts of cdt1. The end goal would be to return the full entity of cdt1 with the updated fields, not just the updated fields. Also to note I will need to be updating around 10 fields.

    Is this possible in Appian ? Is there somewhere I can read up on this topic more? Any further explanation is greatly appreciated.

    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) **Both entites have fields that aren't being used, but in the end I will need to return the entire entity with the updated and non updated fields.
Children
No Data