I have the following setting: A content type "Task" with fields: term reference: unit name integer: unitnumber entity reference: here I am referencing an entity form type.

I have specified as patterns for the path from this content type: [node:field_unitname]/[node:field-unitnumber]

When a user fills in the entity form on a certain node from this content type, this should create a blog entry, where the content for title and body field can be fetched from the entity form submissions, but the variables for the unitname and the unitnumber, which are fields in my blog content type as well, should be fetched from the current page url.

Therefore I have created a rule: * Event: After saving a new entityform submission * Condition: Entity has field: (1) Entity: [entityform], Field: field_title and (2) Entity: [entityform], Field: field_blogbodytext * Action: - Create a new entity. Parameter: Entity type: Node, Content type: Blog entry, Title: [entityform:field-title], Author: [site:current-user] Provides variables: New Blog entry (blog_created) - Set a data value. Parameter: Data: [blog-created:body], Value: [entityform:field-blogbodytext]

Now I also would like to set the data values for [blog-created:unitnumber] and [blog-created:unitname] which should be something like "first part of current page url" and "second part of current page url" as the current page url is my-website.com/unitname/unitnumber, but I have no idea where to find these variables in rules.

Could anyone help me out, how to get these values within rules?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.