Hi,
i am using multidrop down field , i want to update my new values into local variable first then i want to update into my rule input without effecting the rule input values when it is in editable condition and i have tried using the local variable but it is not getting store, can you guys guide how to solve this
a!multipleDropdownField( label:"Pets", placeholder:"select a value", choiceLabels:index(local!pets,"petsNm",null()), choiceValues:index(local!pets,"petsId",null()), value:if( ri!isEditable, ri!pets.petsIdFk, local!pet ), saveInto: if( ri!isEditable, { a!save( local!addition, a!forEach( items:local!pet, expression:'type!{urn:com:appian:types:SHA}SHA_newPets'( petsIdFk:fv!item, mappingKey: local!mappingId )))}, { local!pet, a!save( ri!pets, a!forEach( items:local!pet, expression: 'type!{urn:com:appian:types:SHA}SHA_newPets'( petsIdFk:fv!item, mappingKey: local!mappingId ) ) ) }, ) ),
Discussion posts and replies are publicly visible
a!localVariables( local!pets: { { a!map(petsNm: "dog", petsId: 1) }, { a!map(petsNm: "Cat", petsId: 2) } }, local!mappingId: 1, local!petsSelected_ids: index(ri!pets, "petsIdFk", null()), /* local variable which holds old pet ids and new pet ids selected*/ a!multipleDropdownField( /*disabled: not(ri!isEditable),*/ label: "Pets", placeholder: "select a value", choiceLabels: index(local!pets, "petsNm", null()), choiceValues: index(local!pets, "petsId", null()), value: local!petsSelected_ids, saveInto: { local!petsSelected_ids, a!save(ri!pets,a!forEach( items: local!petsSelected_ids, expression: a!map( petsIdFk: fv!item, mappingKey: local!mappingId ) ) ) } ) )
thank u gayathris0003, i will try this
these are my old rule inputs when i update it the rule inputs are changing in the below format but i want (old ruleputs + new inputs) in my rule input
In my example, In local variable first load the old pets values
thank you gayathris0003, can you please let me know what do you mean by load, it is assigning the rule inputs to the local variables, if it is that i am facing the same error again