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
Why do you need to place the data in local! variables before passing it to the rule inputs? The data won't get passed to the process until the User Input Task node completes, and that only happens when you submit the form. Typically we don't take this 2-step approach unless there's a specific reason.
What is your specific experience? How do you know the data is not arriving in the rule input?
yes,
The data is going to the rule input, but I want to that first, data is store in local variable than after store into rule input.
Why? What's the purpose of storing in the local variable and the rule input? Why is storing it in the rule input alone not sufficient?
Nothing,
I got the task from someone, so that I am trying to solve that in these manner.
You can simply use a!save() function in the saveinto of the submit button.
e.g. a!save(ri!RuleName , local!VariableName)
note - submit : true()
Its not working.
but when I click on dynamic link it shows the previous data on the text field automatically.
Could you please share the code.
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 ) } ) ))
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.