EENN
EENN

Reputation: 919

How can I access the properties of an item in a ContentPicker field in an Orchard Workflow?

I am creating a Workflow to send out some emails when a particular type of content is created. This type of content has a ContentPicker field that contains another piece of content. I use the "Content Created" event to initiate the Workflow and I attach a "Send Email" activity to it. In the body of the email I can get the values of the properties of the newly created content with wildcards like {Content.Fields.Registration.Name}.

Can I access the properties of the nested item doing something like this: {Content.Fields.Registration.Course.Fields.Course.Name}?

EDIT: It's not always possible to access these properties on content creation since saving an item without publishing it doesn't actually store all the necessary records. For my purposes I had to change the initiation of the Workflow to a Content Published event.

Upvotes: 1

Views: 93

Answers (1)

EENN
EENN

Reputation: 919

I figured it out, should have messed around more. {Content.Fields.Registration.Course.Content.Fields.Course.*} allowed me to access the properties I wanted.

Upvotes: 1

Related Questions