I am having cascading dropdown inside a editable grid . I am getting data from db using cdt and storing them in ruleInput . I was facing error for oast 3 days like choice values and labels length didn't match. I tried using the a!save(ri!ruleinput[fv.index].value, save!value), in the saveInto . the error is gone now. But I don't understand how it works. Can anyone explain me or provide any document available it would be helpful.
Discussion posts and replies are publicly visible
Because you are using a editable grid means you have a list of rows in your ri!ruleInput. It is an array and not a singular value.
The expression a!save(ri!ruleinput.value, save!value) means you are trying to save the save!value to all the rows. If you have 3 rows, the 'value' field was attempted to be updated for all three of them and not just for the row you did the selection. If dropdown choice value exceeds the length of data available in labels you get the error you got.
When expression a!save(ri!ruleinput[fv.index].value, save!value) is used, the saveinto happens to the row you changes dropdown selection in, other all rows are unaffected as well as your data in dropdown is also not updated for all rows.
So, indexing worked and attempt to update all rows at once errored out due to data issues in dropdown.
Go through the documentations for better clarity.
https://docs.appian.com/suite/help/25.1/Editable_Grid_Component.html
docs.appian.com/.../fnc_array_index.html
Sorry but one doubt why it didn't work with fv.item.value. for the parent dropdown i have 6 values but when I select one particular value I was getting the error .