tencent cloud

Feedback

Set Variable

Last updated: 2023-08-03 17:12:12

    Overview

    Set Variable is used to declare a variable and save it in variables in message, so that subsequent nodes can reference it in the form of msg.vars.get('name').

    Method

    Parameter configuration

    Parameter Data Type Description Required Default Value Remarks
    Variable name string Variable name. Yes None -
    Value any Specific value of the variable. Yes None -
    Type string Data type of the variable Yes string -
    Operation string Variable operation No None This parameter is available only if a variable of list or dict type exists.

    Configuration page

    image-20210325155553571

    Output

    To reference variables, you need to use the msg.vars.get('company') expression.

    The message output by the component is as detailed below:

    message Attribute Value
    payload This attribute inherits the payload of the previous component.
    error
    • error will be empty if the flow is executed successfully.
    • error will be of dict type and contain the Code and Description fields if the flow fails to be executed. The Code field indicates the error type, and the Description field indicates the error details.
    attribute This attribute inherits the attribute of the previous component.
    variable variable of the previous component and the variables added in the current component.

    Data preview

    https://staticintl.cloudcachetci.com/yehe/backend-news/g9Dw732_2.png
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support