Skip to main content
Known Participant
September 8, 2021
Solved

gridlayout condition

  • September 8, 2021
  • 3 replies
  • 3 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

    New Participant
    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,

    Known Participant
    September 8, 2021

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

    sais0002Answer
    New Participant
    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()

    ),