Here, I have created a decision rule, My requirements are if I call this decision rule in the interface in the orgName field the tax Id and Address should be displayed.
How can i configure this in the interface?
Discussion posts and replies are publicly visible
You can simply call the decision like below, store it into a local variable and then use that data to show in the interface.
rule!ALM_decisionRule(input1: "AKSHARA FOUNDATION" /*Desired input*/ )
Yes i tried this way but its not working
Can you please share your code?
a!localVariables( local!address:rule!ALM_decisionRule(input1: "AKSHARA FOUNDATION"), { a!columnsLayout( columns: { a!columnLayout( contents: { a!sectionLayout( label: " ", contents: { a!boxLayout( label: "Donation Details", contents: { a!pickerFieldUsers( label: "Donor *", labelPosition: "ABOVE", placeholder: "Enter the name of the Donor", maxSelections: 1, value: ri!donationDetails.donarName, saveInto: ri!donationDetails.donarName, readOnly: ri!isReadOnly ), a!sideBySideLayout( items: { a!sideBySideItem( item: a!dropdownField( label: "Organization Name", labelPosition: "ABOVE", placeholder: "Choose a value", choiceLabels: local!address, choiceValues: local!address, value: local!address, saveInto: ri!donationDetails.orgName, disabled: ri!isReadOnly ) ),
here in place of input: "Akshara foundation" i tried giving fv!item also bt it didnt wrk
Sorry, I didn't get your full code (or) what you're trying to do exactly. But I've attached a sample of how the decision can be used.
a!localVariables( local!address: rule!ALM_decisionRule(input1: "AKSHARA FOUNDATION"), { a!sectionLayout( label: " ", contents: { a!boxLayout( label: "Donation Details", contents: { a!sideBySideLayout( items: { a!sideBySideItem( item: a!textField( label: "Organization Tax Id", labelPosition: "ABOVE", readOnly: true(), value: local!address.output1 ) ), a!sideBySideItem( item: a!textField( label: "Organization Address", labelPosition: "ABOVE", readOnly: true(), value: local!address.output2 ) ) } ) } ) } ) } )
Actually here. in this code i am trying to pass the decision rule in place of choice values and choice labels so when a person selects the field he can see the options.
( In my decision rule the input1 values are me organisation name values and my ouput1 value is my taxid and my output 2 is my address)
a!sideBySideLayout( items: { a!sideBySideItem( item: a!dropdownField( label: "Organization Name", labelPosition: "ABOVE", placeholder: "Choose a value", choiceLabels: local!address, choiceValues: local!address, value: local!address, saveInto: ri!donationDetails.orgName, disabled: ri!isReadOnly ) ),
Decision objects in Appian are meant to return specific output values based on the input value. You have designed your decision like it'll return only one output (tax Id & Address) for the given input name. So the output is always going to be a single map with two fields.
This data is not apt for passing as choice values in a drop-down. I'd recommend rethinking your design approach.
Yeah sure. Thank you