Is there a way to get current user value in a line item for a module that does not have user dimen

Is there a way to get current user value in a line item for a module that does not have user dimension

Tagged:

Answers

  • @sagarkpr

    No, you would need it to be dimensionalized by the Users dimension.

  • Dikshant
    edited October 19

    Without user dimension, it won't come, but I would like to know the use case. Why you need a Current User in a module that is not dimensionalized by user? If your purpose is to display the name of Current Use then you can create a module with user dimension, create a line item NAME and formula: NAME(ITEM(Users)). Then turn Off Show Users list. This way if you publish this line item to NUX, it will always show Current User Name.

  • @Dikshant

    I have a module A that has user dimension, this module is created to allow each user give them own working UX page so one persons edit does not conflict with other person's work.

    Now when a process is run, I have to take a static snapshot of the Module A (for the current user) and save it to Module B. For the size & performance I do not want the Module B to be user dimension. So I need a way to just create a filter view in Module A that will process will use to copy data from A to B.

  • @sagarkpr ,

    Turn-off 'users list' setting of your user dimensioned module, so that even workspace admins can see/copy data only of their own (current user).


    With an import action from user dimensioned module to non-user dimensioned module, you can simply import data of the latest user who has pressed the button. To capture the name/id of that user, you might need another simple source (SYS Users module and item/name of user), target lineitem, and an action to just import user detail. Bundle both the actions into a process.

    Hope this makes sense to your context.

    Cheers!

  • @AjayM

    I tried testing this show all users off but even then when I run the import it didnt work as expected.

    Do you have positive confirmation of this? Want to confirm if I didnt do anything wrong.

  • Yes @sagarkpr , I tested it myself too. Check the below:

    1. Input source module by users, where I have 4 users and got input entered by all 4 of them


    2. 'Show All Users' setting of source module at the moment

    3. Saved view in the source module

    4. Output module after running the import action: Since no user dimension in my target module, it aggregated input of all users

    5. Now let's turn off the 'show all users' in source module

    6. Input module after step #5

    7. Output module after rerunning the action

    In all this exercise, I am workspace admin, but the only difference is On vs Off for 'show all users' setting in the source module.

    Please try this again, and let us know what discrepancy you are noticing?

    Cheers!

  • @AjayM

    Thanks, I will give it a try. Is there a trick I can use to do the reverse.


    Like Importing data from Non-User dimension module to User dimension module but it should only update the data for the user who ran the action?

  • Sure:
    1. Create staging lineitem in user dim'd module, and refer the input from non-user module directly into this staging lineitem. At this point, staging lineitem holds same data for all users.
    2. Create an action that imports data from staging lineitem into the actual input lineitem within user dim'd module.
    3. Turn-off the 'show all users', and then run the action.
    4. Turn back the 'show all users' ON and check if the data is appearing against other users in the original input lineitem (it shouldn't appear).
    5. Once you are satisfied, turn-off 'show all users' in the user dim'd module.

    Cheers!

  • sagarkpr
    edited October 25

    TY will give it a try on both the option

  • Well both are different approaches, but for different requirements. Check again the user requirement/expected functionality, and design accordingly.

    Cheers!