Skip to main content
Known Participant
Sep 8, 2021 3:53 AM UTC
Solved

gridlayout condition

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

    sais0002Answer
    New Participant
    Sep 8, 2021 4:37 AM UTC

    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
    Sep 8, 2021 4:21 AM UTC

    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
    Sep 8, 2021 4:29 AM UTC

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

    sais0002Answer
    New Participant
    Sep 8, 2021 4:37 AM UTC

    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()

    ),