Clarification on a!writeToDataStoreEntity

My data table has 5 columns with data. In the UI i am rendering only 2 fields to edit i an editable grid. While saving it overwrites the other field values as null. Is this an expected behavior ?How to avoid it ? I want to retain the value in the fields that are not brought to the UI at all.

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    A Score Level 1
    in reply to chandolum
    load(
    local!pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: - 1
    ),
    local!data: a!queryEntity(
    entity: cons!MK_DSE_QUALIFICATION,
    query: a!query(
    selection: {
    a!querySelection(
    columns: {
    a!queryColumn(
    field: "skillName"
    ),
    a!queryColumn(
    field: "certifiedOn"
    ),
    a!queryColumn(
    field: "employeeID"
    )
    }
    )
    },
    pagingInfo: local!pagingInfo
    )
    ),
    a!dashboardLayout(
    contents: {
    a!buttonArrayLayout(
    buttons: a!buttonWidget(
    label: "Save",
    saveInto: {
    a!writeToDataStoreEntity(
    cons!MK_DSE_QUALIFICATION,
    local!data.data
    )
    }
    )
    ),
    a!gridLayout(
    label: local!data.data,
    labelPosition: "ABOVE",
    headerCells: {
    a!gridLayoutHeaderCell(
    label: "Header1",
    showWhen: false()
    ),
    a!gridLayoutHeaderCell(
    label: "Header2"
    ),
    a!gridLayoutHeaderCell(
    label: "Header3"
    )
    },
    columnConfigs: {},
    rows: a!forEach(
    items: local!data,
    expression: {
    a!gridRowLayout(
    id: fv!item.expense_id,
    contents: {
    a!textField(
    label: "expitem",
    value: fv!item.skillName,
    showWhen: false(),
    saveInto: fv!item.skillName
    ),
    a!textField(
    label: "expitem1",
    value: fv!item.employeeID,
    saveInto: fv!item.employeeID
    ),
    a!textField(
    label: "expType",
    value: fv!item.certifiedOn,
    saveInto: fv!item.certifiedOn
    )
    }
    )
    }
    ),
    selectionSaveInto: {},
    validations: {},
    shadeAlternateRows: true
    )
    }
    )
    )


    Above code snippet is working for me , when i click on button it's updating the values
Children