Using Decision Object within a Record

I'm trying to use a decision object within a record for a related action. For the related action, I need to change the context based on an input.  Here's what I've tried within my decision object.  I feel like it is not interpreting the text correctly into the context.  Is there a work around for this?

 

U identifier input (object type) output (contextForRelatedAction)
1 = Type A

{

id: rule!getIdbyTypeAName(rf!Id),

name: "Name for: Type A"

}

2 = Type B

{

id: rule!getIdbyTypeBName(rf!Id),

name: "Name for: Type B"

}

3 = Type C

{

id: rule!getIdbyTypeCName(rf!Id),

name: "Name for: Type C"

}

  Discussion posts and replies are publicly visible