Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Trying to set a data value for a taxonomy custom field, but it seems only the default fields are available in the selector. Is it possible to access the additional fields?
Comments
Comment #1
fagoYes, make sure to use the entity has field condition or check for the bundle first, e.g. by using the content is of type condition.
Comment #2
fagoComment #3
modstore CreditAttribution: modstore commentedThankyou for your reply.
I don't think I can this, as the entity that I am trying to set a data value of, is one I have just created using the 'create a new entity' action. Therefore the the conditions can't apply to this entity.
Comment #4
modstore CreditAttribution: modstore commentedI got this working by creating a second rule for the event "after saving term" which allowed me to do what i needed after setting the has field condition.
Thanks for the help!
Comment #6
amr05h CreditAttribution: amr05h commentedI'm currently experiencing a similar issue, modstore, and I'm hoping you can expand on how you fixed it. I'm attempting to make a rule that upon saving a node, 1. creates a taxonomy term based on [node:field-project-name] then 2. appends the [node:term-reference] field in that same node with my newly created taxonomy term. When I go to set the data value in [node:term-reference] to my newly created taxonomy, I'm only given the option for static terms, or for the parent/vocabulary of the newly created taxonomy.
If I were to create a second rule, I'd be unable to reference the node/field that term was based on, leaving me still unable to append my term-reference field with my custom taxonomy.