Remove Filter on click of cancel button

I have an interface (say A) where am filtering data then clicking on ID am going to interface(say B) where i perform some activities like edit. Upon click of submit/Cancel i am returning back to Interface A.

When I return back to interface A then all the filters that i had applied(previously on interface A) should be removed. How to Achieve this

  Discussion posts and replies are publicly visible

Parents Reply Children
  • I have applied filter on ID field in Read Only grid..its like

    data:local!abc,

    columns{

    gridColumn( label:"ID"

    value:linkField(links:dynamicLink( label:fv!row.id, value:fv!row.id))

    )

    }

  • 0
    Certified Associate Developer
    in reply to Som

    hi ,

    if the filter is applied on the record and filter's called from the record then i don't think, so filter value can be removed. But if you made custom filter into the interface and filtering the grid accordingly, then on the submit button you can pass null into the filter.

    Here is the similar example related to your problem.

    You can alternate the “value” after the form is submitted.

    let me know that this will solve your problem or not.

  • bro am not using record to fetch details in Read only grid....It was already implemented long back so please don't ask why you have not used record

  • 0
    Certified Associate Developer
    in reply to Som

    a!localVariables(
      local!filter,
      {
        a!integerField(
          label: "filter",
          value: local!filter,
          saveInto: local!filter
        ),
        a!gridField(
          label: "Read-only Grid",
          labelPosition: "ABOVE",
          data: index(
            rule!SOM_qe_getLookUpData(lookupIdPk_int: local!filter),
            "data",
            {}
          ),
          columns: {
            a!gridColumn(
              label: "de",
              value: fv!row.lookupCategoryIdFk_int
            )
          },
          validations: {}
        ),
        a!buttonArrayLayout(
          buttons: {
            a!buttonWidget(
              label: "SUBMIT",
              saveInto: { a!save(local!filter, null()) }
            )
          }
        )
      }
    )

    May be this above code will help you.

    You just have to pass the filter value to the "local!filter" and while the submission, save null() to local!filter.

    I hope this will help you.