Remove function unable to delete data from the table in database

Certified Associate Developer

a!forEach(
items: local!milestonedata,
expression: {
a!gridRowLayout(
id: fv!index,
contents: {
a!paragraphField(
value: { fv!item.milestone },
saveInto: fv!item.milestone,
characterLimit: 1000,
required: true
),
a!dateField(
value: { fv!item.milestoneDate },
saveInto: {
fv!item.milestonedate,
a!save(fv!item.projectId, local!data.projectId),
a!save(fv!item.phaseId, local!data.phaseId),
a!save(fv!item.isActive, true),
if(
isnull(fv!item.projectMilestoneId),
a!save(fv!item.createdOn, now()),
a!save(fv!item.updatedOn, now())
),
if(
isnull(fv!item.projectMilestoneId),
a!save(fv!item.createdBy, loggedInUser()),
a!save(fv!item.updatedBy, loggedInUser())
)
},
required: true
),
a!dropdownField(
label: "",
labelPosition: "ABOVE",
placeholder: "--- Select a Value ---",
choiceLabels: rule!PLT_GetReferenceDataStatus(parentId: cons!PLT_ParentId[6]).Name,
choiceValues: rule!PLT_GetReferenceDataStatus(parentId: cons!PLT_ParentId[6]).referenceId,
value: fv!item.statusId,
saveInto: fv!item.statusId,
searchDisplay: "AUTO",
required: true,
validations: {}
),
a!richTextDisplayField(
value: a!richTextIcon(
icon: "close",
altText: "delete " & fv!index,
caption: "Remove ",
link: a!dynamicLink(
value: { fv!index, },
saveInto: {
a!save(
local!milestonedata,
remove(local!milestonedata, save!value)
)
}
),
linkStyle: "STANDALONE",
color: "NEGATIVE"
)
)
}
)
}
)
},
selectionSaveInto: {},
height: "SHORT",
addRowlink: a!dynamicLink(
label: "Add Milestone",
value: {
'type!{urn:com:appian:types:PLT}PLT_ProjectMilestones'()
},
saveInto: {
a!save(
local!milestonedata,
append(local!milestonedata, save!value)
)
}
),
rowHeader: 1
)
},
style: "STANDARD",
shape: "SEMI_ROUNDED",
marginAbove: "NONE",
marginBelow: "STANDARD",
showBorder: false,
showShadow: true
),

button code

 a!buttonArrayLayout(
                buttons: {
                  a!buttonWidget(
                    label: "Update",
                    value: true,
                    saveInto: {
                      /*a!save(ri!submit, true),*/
                      /*a!save(ri!plt_projects, local!data),*/
                      /*a!save(ri!milestone, local!milestonedata),*/
                      /*a!save(ri!users, local!users),*/
                      a!save(local!SuccessfulSave, true),
                      a!startProcess(
                        processModel: cons!PLT_PM_UPDATE_PROJECT,
                        processParameters: {
                          milestone: local!milestonedata,
                          plt_projects: local!data,
                          projectid: index(local!data, "projectId", {}),
                          submit: true(),
                          users: local!users
                        }
                      )
                    },
                    submit: true,
                    style: "NORMAL",
                    validate: true,
                    validationGroup: "submit"
                  )
                },
                align: "END"
              )

I am trying to use remove function but its only removing the data from the index but not from the database table when i click on the submit it should be able to remove that data from the table

  Discussion posts and replies are publicly visible

Parents Reply Children