Compare value on current logged in user email

I have a module with historicals captured by different users via another Model.

My module has one line Item which has the email ID(Customer Email) of that particular user, however this module is not dimensioned by Users. For this module i only have one dimension which is basically the Index for the records, rest other data is being imported via action.

I want to make sure that particular user should see data where his/her email = customer email.

Any suggestions on how can make a filter like current user = Customer Email when displaying data on UX.

Best Answer

  • alexpavel
    Answer ✓

    @JAbhi : you can also use the "DCA - Read" line-item from @Tiffany.Rice example as a Filter in your module with data (DAT001) to see only the rows of the "Current User".

    You can see more about User Filters in this micro lesson:

    https://community.anaplan.com/kb/articles/63725-user-filters

    "Users" lists behave like any other list, with a major nice feature: the option of the "Current User" when used in filters.

    The trick to having a users-based filter is to combine the Users list with one of your data modules lists (DAT001).

    In this example, DAT001 has only 1 list: the numbered list that contains transactional data that needs to be combined in a line-item with Users. After that, this line-item can be used Filters or DCA (if it's Boolean).

    Hope it helps

    Alex

Answers

  • I'm thinking you will first want to create a line item to cross reference the email ID (text field) against the users list. In an ideal would the data would be imported directly into a list formatted line item but if that isn't possible, the https://help.anaplan.com/finditem-0668e215-a0d2-4ad1-b93f-3c2a56a9f5c2 can be used to lookup a text value within a specified list (in this case Users). *Keep in mind, this function can be a performance drain if applied to large modules so use with care.

    An example below:

    To ensure that the user can only view their data, you would create a https://help.anaplan.com/dynamic-cell-access-55ae93e6-5139-4bbf-93f9-c8cb06f68f75 driver an then apply it to the line items/module. See below for examples of the driver setup and how that can then be applied to specific line items:

    See here for the final view of the module, not the difference between the two data lines where an access driver is and is not applied.

    Finally, on your UX page you can use the same DCA driver Boolean line item as a filter. This ensures the data is secure and also optimized for the user.

    Hope this example helps!

  • thanks for responses, and all the explanation as well.
    Really helped.