Skip to main content
Legacy User
October 28, 2022
Solved

How do I update a Variable when a document attribute is updated by a user (during a workflow)?

  • October 28, 2022
  • 5 replies
  • 558 views

I want to have Info dynamically change throughout the workflow/sub-workflow task progression (calling the Update Information step multiple times). I can reference the variable to Update Information based on two variables:

<%#Variable.Contract_Name%>​ | <%#Variable.Workflow_Status%>​

The variable Contract_Name also happens to be an attribute that the user can update. I can think of two ways to do this, but do not know how to do either:

  1. If the Contract_Name attribute is updated, I then update the variable Contract_Name by updating from the attribute. How would I do this if possible?
  2. Instead of referencing the Variable.Contract_Name when updating Info, I reference the attribute Contract_Name. If this is possible, how would I pull from an attribute in a Workflow?
    Best answer by Community Expert

    Hi,

    Let me see if I can help you.

    It is important to remember that an attribute value and a variable value are not the same piece of data and although they may start as the same value (either because the variable is writing the attribute or the attribute is writing the variable), in the course of the workflow, these values can diverge as you are observing.

    When we want to reference attribute values while in workflow, we recall the workflow builder uses a synonym "Metadata Value" for attribute. You can use the Update Document Metadata Value step to write a variable value (or fixed value) into the attribute.

    If you want to go the other direction and refresh your variable with whatever the current attribute/metadata value is, you can use the Find Document step to refresh the current attribute values into the metadata value for the workflow, and then the Update Variable Value step with that value. You can find the variable notation for your metadata from the execution view of the workflow, and then look at the document as a variable, and retrieve the XML, but it's probably something like:

    <%#DOCNAME.Documents.Document.ATTRIBUTEGROUP.Contract_Name%>

    which you can shorten to:

    <%#DOCNAME.ATTRIBUTEGROUP.ContractName%>

    or even <%#DOCNAME..ContractName%> if you aren't using that variable name elsewhere.

    The Find Document step is your "refresh" to make sure you are getting the current value rather one that has been changed since the workflow started running.

    Respond again if you need more help.

    Kindly,

    Kat Harrison

    5 replies

    Legacy User
    October 31, 2022

    Hello,

    Welcome to the DocuSign Support Community! What you are asking assistance with is beyond the scope of moderator expertise regarding CLM.

    It appears that you opened a Support case last week in addition to posting here. I talked to the Account Manager for your company and he suggested that you (or someone on your team) could talk to the Pro-Serv contact to get help with this.

    Best regards,

    Donna | DocuSign Community Manager

    Docusign Employee
    November 1, 2022

    Hi,

    Let me see if I can help you.

    It is important to remember that an attribute value and a variable value are not the same piece of data and although they may start as the same value (either because the variable is writing the attribute or the attribute is writing the variable), in the course of the workflow, these values can diverge as you are observing.

    When we want to reference attribute values while in workflow, we recall the workflow builder uses a synonym "Metadata Value" for attribute. You can use the Update Document Metadata Value step to write a variable value (or fixed value) into the attribute.

    If you want to go the other direction and refresh your variable with whatever the current attribute/metadata value is, you can use the Find Document step to refresh the current attribute values into the metadata value for the workflow, and then the Update Variable Value step with that value. You can find the variable notation for your metadata from the execution view of the workflow, and then look at the document as a variable, and retrieve the XML, but it's probably something like:

    <%#DOCNAME.Documents.Document.ATTRIBUTEGROUP.Contract_Name%>

    which you can shorten to:

    <%#DOCNAME.ATTRIBUTEGROUP.ContractName%>

    or even <%#DOCNAME..ContractName%> if you aren't using that variable name elsewhere.

    The Find Document step is your "refresh" to make sure you are getting the current value rather one that has been changed since the workflow started running.

    Respond again if you need more help.

    Kindly,

    Kat Harrison

    Legacy User
    November 1, 2022

    Correcting Myself: " if you aren't using that variable name elsewhere." should be "if the attribute name is used only in one attribute group."

    Legacy User
    November 1, 2022

    Thank you, Kat. This worked.

    Justin Jiang
    Established Contributor
    Established Contributor
    April 25, 2024

    Find document is the key

    Welcome to the DocuSign Community and University! Your feedback is immensely appreciated. If this answer resolves your issue, please feel free to give it a Like and mark it as the "Best Answer". This helps others in the community find the information they need. Visit us at http://dsucustomers.docusign.com for more resources and support.