I am using the add row in the dynamic link and delete of editable grid, am having columns like account and category these are mandatory fields .
initially grid is empty if i click on add row link it will add a new row in grid.
now without entering data into columns(mandatory fields using required) clicked on submit button .so it will throw validation for fields ( account , category). am deleted the empty row and adding new row .the new row i added is validating default. is there any way to handle this or its default functionality of appian
Thanks in advanced
Discussion posts and replies are publicly visible
Find the below test code
=a!formLayout( label: "Lorem Ipsum", instructions: "Lorem Ipsum", contents: { a!gridLayout( label: "Editable Grid", labelPosition: "ABOVE", headerCells: { a!gridLayoutHeaderCell(label: "Account") }, columnConfigs: { a!gridLayoutColumnConfig( width: "DISTRIBUTE" ) }, rows: { a!forEach( items:ri!account, expression:a!gridRowLayout( contents: { a!textField( label: "Text", labelPosition: "ABOVE", value: fv!item, saveInto: {fv!item}, refreshAfter: "UNFOCUS", required: false(), validations: {} ) } ) ) }, selectionSaveInto: {}, addrowlink: a!dynamicLink( label: "Add New", saveInto: {a!save(ri!account,append(ri!account,"")),a!save(ri!category,append(ri!category,""))} ), validations: {a!validationMessage(validateAfter:"SUBMIT",message:"all fields are mandatory",showWhen:or(a!forEach(items:ri!account ,expression: isnull(fv!item))))}, shadeAlternateRows: true ) }, buttons: a!buttonLayout( primaryButtons: { a!buttonWidgetSubmit( label: "Submit", saveInto: {}, style: "PRIMARY" ) }, secondaryButtons: { a!buttonWidgetSubmit( label: "Cancel", value: true, saveInto: ri!cancel, style: "NORMAL", skipValidation: true ) } ), validations: {} )