Skip to main content
September 8, 2021
Solved

gridlayout condition

  • September 8, 2021
  • 3 replies
  • 0 views

Hi everyone,

How can I apply condition of grid column so the only particular logged in user can see the specific rows in the grid layout.

Thank You

    Best answer by sais0002

    I assume you are retrieving the data to be showed in the grid from database using a query entity. The query entity will query a particular view or table. In the query entity filter the data based on loggedInUser. For example add a condition similar to this in your query entity,

    a!queryFilter(
    field: "Your table column name",
    operator: "=",
    value: loggedinuser()

    ),

    3 replies

    September 8, 2021

    While retrieving the data you should filter it based on logged in user. Value for local!data should have filtered data for logged in user.

    a!gridField(
    label: "",
    labelPosition: "ABOVE",
    emptyGridMessage: "No data available",
    data: local!data,

    September 8, 2021

    @sais0002: Can you please give me more detail on applying filter.

    sais0002Answer
    September 8, 2021

    I assume you are retrieving the data to be showed in the grid from database using a query entity. The query entity will query a particular view or table. In the query entity filter the data based on loggedInUser. For example add a condition similar to this in your query entity,

    a!queryFilter(
    field: "Your table column name",
    operator: "=",
    value: loggedinuser()

    ),