How to display a different (new) section on click of SUBMIT button?

Hi,

I have a editable grid where the user can edit the data on the grid and on click of submit button, data will be saved in DB. Am using writetodatastore entity smart service onclick of submit button. OnSuccess I need to hide the editable grid and display a section with the corresponding message. I tried below code and some thing else also but no luck,

a!buttonLayout(
          primaryButtons: {
            a!buttonWidgetSubmit(
              label: "Submit",
              saveInto: {
                a!writeToDataStoreEntity(
                  dataStoreEntity: cons!DS_ENTITY_REF_EMPLOYEE,
                  valueToStore: local!questionsToUpdate.data,
                  onSuccess: {
                    with(a!richTextDisplayField(
                      label: "Employee's Updated Successfully",
                      align: "CENTER",
                      style: "STRONG"
                    ))
                  },
                  onError: {
                   
                   
                  }
                ),
                local!currentStep
              },
              style: "NORMAL"
            )
          },
          secondaryButtons: {
            a!buttonWidgetSubmit(
              label: "Cancel",
              value: true,
              saveInto: ri!cancel,
              style: "LINK",
              skipValidation: true
            )
          }
        )

Thanks.

Regards,

Balaji.R

  Discussion posts and replies are publicly visible