How can I filter a grid on a UX page that does not have that dimension

Use case

Module - Emp Details

List Used - Employee

Line items - State (List), Emp Start Date (Date)

On my UX Page, I would like to create a State filter that allows me to filter only those employees that belong to that site.

Since Emp Details doesnt have State as a dimension, its not available as page selector.

Tagged:

Answers

  • ryan_kohn
    edited February 2023

    There is a How To article on leveraging the Current User Filter technique for building the type of filter you are interested in. The article was written for the Classic UI, but the same concepts will work on a UX page.

    Alternatively, you can just leverage the native filtering available on a grid card to allow people to filter by that specific line item, as long as the line item is visible on the grid.

  • Thanks @ryan_kohn, this helps. I was just thinking filtering from page selector perspective but we can always filter on Grid. I will try that

  • @sagarkpr : isn't enough for users to use native filtering directly on the published grid?



    The advantage is that the user could select multiple States to filter.


    If you really want to have Page selector of the State you could to create an additional module with Lists Emplyee and State with exactly the sale line-items and with "Apply To" only list Employee in order not to duplicate too much cells.

    You can create a new line-item "Filter State" with formula like item(State) = State and publish in NUX this additional module with the NUX filter "Filter State" = TRUE.... but not sure if it's worthy all the effort :).

    Hope it helps

    Alex

  • Thanks @alexpavel That's exactly I got it working before I posted the question. I didnt like that I had to create additional module and line items to get it. So I posted the question.

    I think the inherit filter on the grid looks good. Only downside, that filter cant be synced to other visuals on the page. if we have 4 grids and chart. User will have to apply filter on all 4. Page selector can be synched and has that advantage

  • @sagarkpr : in that case you could follow the Current user filter approach as @ryan_kohn mentioned.

    you can publish the State line-item from the user filter module as "Field" card to have similarity with "Page" selectors and apply to all cards and page selectors the current user State filter.

    However.. you still need to create the filter modules :).

    But, the Current user filters mechanism is automatically refreshing on all cards/grids published.

    Duplicating the Employee module with the State list seems that requires less effort :).

    Alex