I can't send the data from local variable to rule input.

Hello Community,

I am facing the problem in interface that I am not able to send the data form local variable to rule input.

whenever I click the submit button, I wanted to that the data send into the rule input from local variable.

please help me

  Discussion posts and replies are publicly visible

Parents Reply Children
  • a!localVariables(
    local!NewRow: 'type!{urn:com:appian:types:AE}AE_EXErcise'(),
    a!formLayout(
    label: "Employee Detail",
    contents: {
    a!gridLayout(
    label: "",
    labelPosition: "ABOVE",
    headerCells: {
    a!gridLayoutHeaderCell(label: "Name"),
    a!gridLayoutHeaderCell(label: "Department"),
    a!gridLayoutHeaderCell(label: "Document"),
    a!gridLayoutHeaderCell(label: "")
    },
    columnConfigs: {
    a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight: 1),
    a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight: 1),
    a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight: 1),
    a!gridLayoutColumnConfig(width: "ICON")
    },
    rows: {
    a!forEach(
    items: ri!item,
    expression: a!gridRowLayout(
    contents: {
    a!textField(
    label: "Name",
    labelPosition: "ABOVE",
    value: local!NewRow.name,
    saveInto: local!NewRow.name,
    refreshAfter: "UNFOCUS",
    required: true,
    validations: {}
    ),
    a!multipleDropdownField(
    label: "Department",
    labelPosition: "ABOVE",
    placeholder: "------Select a Value------",
    choiceLabels: cons!AE_DEPARTMENT,
    choiceValues: cons!AE_DEPARTMENT,
    value: local!NewRow.department,
    saveInto: local!NewRow.department,

    validations: {}
    ),
    a!fileUploadField(
    label: "Document",
    labelPosition: "ABOVE",
    target: cons!AE_PHOTOS,
    value: local!NewRow.document,
    saveInto: local!NewRow.document
    ),
    a!richTextDisplayField(
    labelPosition: "COLLAPSED",
    value: {
    a!richTextIcon(
    icon: "times",
    link: a!dynamicLink(
    label: "",
    saveInto: {
    a!save(ri!item, remove(ri!item, fv!index))
    }
    ),
    color: "#ff0000"
    )
    }
    )
    }
    )
    )
    },
    selectionSaveInto: {},
    addRowLink: a!dynamicLink(
    label: "Add New Employee",
    saveInto: {
    a!save(ri!item, (append(ri!item, local!NewRow)))
    }
    ),
    validations: {},
    shadeAlternateRows: true
    )
    },
    buttons: a!buttonLayout(
    primaryButtons: {
    a!buttonWidget(
    label: "Submit",
    icon: "check",

    value: ri!item,
    /*saveInto: a!save(ri!item , local!NewRow),*/
    saveInto: local!NewRow,
    submit: true,
    style: "PRIMARY",
    loadingIndicator: true
    )
    }
    )
    )
    )

  • 0
    Certified Lead Developer
    in reply to sunilc0004

    Where are you getting the above code originally?  The grid cells are configured wrong - they should be saving their values into fv!item.name (etc), not local!NewRow.name etc.

    Additionally - when posting a long code block like this, please use a Code Box to maintain indentation and readability here on community.