Hello, I have editable grid in which I have 3 dropdowns, I'm picking up the values and choices from constants and have rule decisions based on that now for the first row it's working perfectly fine I select "Region" then "Country" and then "Language", but once I add new row I loose all the values from second and 3rd dropdowns and they become blank and I'm not able to select anything.
Here is the full code for the a!foreach is it something within the add row function?
rows: a!forEach( items: ri!AOS_Documents_Required, expression: a!gridRowLayout( id: fv!index, contents: { a!dropdownField( choiceLabels: cons!AOS_Regions, choiceValues: cons!AOS_Regions, label: "Dropdown", labelPosition: "ABOVE", placeholder: "--- Select a Value ---", value: fv!item['recordType!AOS_Documents_Required.fields.Region'], saveInto: fv!item['recordType!AOS_Documents_Required.fields.Region'], searchDisplay: "AUTO", validations: {} ), a!dropdownField( choiceLabels: rule!AOS_region_country(region: ri!AOS_Documents_Required['recordType!AOS_Documents_Required.fields.Region']), choiceValues: rule!AOS_region_country(region: ri!AOS_Documents_Required['recordType!AOS_Documents_Required.fields.Region']), label: "Dropdown", labelPosition: "ABOVE", placeholder: "--- Select a Value ---", value: fv!item['recordType!AOS_Documents_Required.fields.Country_Template'], saveInto: fv!item['recordType!AOS_Documents_Required.fields.Country_Template'], searchDisplay: "AUTO", validations: {} ), a!dropdownField( choiceLabels: rule!AOS_country_language(country: ri!AOS_Documents_Required['recordType!AOS_Documents_Required.fields.Country_Template']), choiceValues: rule!AOS_country_language(country: ri!AOS_Documents_Required['recordType!AOS_Documents_Required.fields.Country_Template']), label: "Dropdown", labelPosition: "ABOVE", placeholder: "--- Select a Value ---", value: fv!item['recordType!AOS_Documents_Required.fields.SDS_Language'], saveInto: fv!item['recordType!AOS_Documents_Required.fields.SDS_Language'], searchDisplay: "AUTO", validations: {} ), a!richTextDisplayField( value: a!richTextIcon( icon: "close", link: a!dynamicLink( saveInto : a!save( ri!AOS_Documents_Required, remove(ri!AOS_Documents_Required, fv!index) ) ), linkStyle: "STANDALONE", color: "NEGATIVE" ) ) } ) ), selectionSaveInto: {}, addRowLink: a!dynamicLink( label: "Add new", saveInto: ri!AOS_Documents_Required, value: append( ri!AOS_Documents_Required, 'recordType!AOS_Documents_Required'() ) ), validations: {}, shadeAlternateRows: true
Discussion posts and replies are publicly visible
Then, you might want to reconsider your logic regarding that decision.
Do you have any suggestion on how I can make this work.
The only advice I can give is, to strictly follow the root cause analysis process. Isolate problematic sections, understand & solve the issues, then recombine.