Show Parent when no child + selection

Good morning, 

 

My lists are as follow. Parent: Mission --> Programm --> Activity --> Expense  (lowest level)

 

My objective is to put in place a filter that allows me to see the Activity items even though I have no existing Depense under the acitvity, combined with a filter where the user can select to narrow the view on one acitvity (in a module that has Expense dimension). 

 

First in the process the user can select on different level of the hierarchy through line items published on the dashboard. If the user select (for example) Activity 1 the module should only display activity one. 

If user doesn't select anything, all activities (and rest of hierarchy) should be displayed in the view. 

 

I managed to show all the activities (with and without child) by creating a 'True' boolean and another item saying 'if true then 1 else 0' and applying a formula summary method. This works and shows every level of the hierarchy However, I cannot find a workaround to be able to show only the activity selected in the filter. 

 

Thanks in advance for you help.

Tagged:

Answers

  • @sweemaels 

    The problem you face is in the module dimensioned by Expense, if there are no children, there is effectively no data at that level.

    It might be worth posting some screenshots of your dashboards, but from what I've understood I would create a module by activity and just display the rows and use this as a selector itself.  The displayed activities should be filtered based on the user selection.  The lower grid, by expense, should then be set to synchronise to this module. 

    In my example below, I have just used a page selector for Program to synchronise the activities instead of a filter for simplicity.

    2019-04-10_09-33-50.png

     

    2019-04-10_09-34-11.png

     I hope that helps2019-04-10_09-35-35.png

    David

  • Hi @sweemaels,

     

    PFA the detailed document with screenshots.

     

         1. Create a Selection module with a line item (no dimension) - “Activity” as format.

    1. Create another module with Expense as dimension and add line items as per below screenshot
    2. Create a dashboard, publish the below with the Filter enabled (see screenshot).
    • “Select Activity” line item from “Selection” module
    • Test module

    Thanks

    Sathya

  • Just a couple of best practice tips for the above (and I know this was just a mock up) when/if you put this into production

     

    1. You should have a module by expenses (and no other dimension) to hold the parent values

    2. Keep the filter line items in a separate module (a la DISCO) so it could be re-used if needed

    3. Resolve the filter to a single boolean; this will be faster than multiple conditions

     

    David

  • Hi Sathya, 

     

    I've been trying the same way but, unfortunately this doesn't  work as some activities do not have any expenses,  the formula parent(item(expense)) will be blank and not work.

     

    Thanks for you input 

  • Hi David, 

     

    Thanks a lot for you input. 

     

    It is indeed what we have at the moment (see screen shots):

    1) user select filter that filter the first table per activity 

    2) user select an activity in the first table 

    3) selection synchronizes with tables underneath

     

    However we had some comments from the end user that didn't understand that their filter were not applying to all the tables. The objective would be to apply the filter selected in the first step in the second table (that for now has expenses only for some activities)

     

    Any idea ?

     

    thanks a lot, 

     

    Sarah 

  • I'm a little confused because the approach above from @SathyaM will work for any grid where you use the filter, but if there are no expenses under the activity then there should be nothing to show anyway, so the fact the parent field is blank doesn't matter

    What do you want the grids to show if there are no expenses under an activity?

    David

  • Hi David, 

     

    It is necessary for us to show the parent (=activity) in order to be able to add an expense manually via the dashboard. 

    To be able to add an item manually (via a creation action), users need to select the parent. This is mainly why we need all activities to be visible. 

     

    Thanks again for your answer

     

    Sarah

  • Sarah,

    I think it might be better to use a selection module, as I described earlier, which will automatically sync all other views, but have you tried using "prompt for parents" in the create action?

    2019-04-11_11-01-35.pngDavid

  • Hi David,

     

    Yes we thought about it but it doesn't seem to be a solution for us as it would add an extra step to the process and we are trying to simplify and reduce the number of clicks as much as possible.. 

     

    Thanks 

     

    Sarah 

     

     

  • Hello, I encountered a similar issue. Here is the work around that I did:

    1. Have a SYS Module for the parent of the dimension or create a line item to calculate the parent of the dimension
    2. Create a line item (Format: Parent List) with Applies to the parent of the dimension
    3. Create a line item (Boolean) with Applies to the parent list of the dimension ( if your reference is on another Sys module, use the line item in Number 2)
    4. Create a line item (Boolean) with Applies to the dimension and do a LOOKUP on the line item in Number 3 using Number 1 as reference. (E.g Line Item Number 3 [Lookup: Line Item Number 1]

    I hope this is clear. :)

    Spread the love and humanity

  • Hello, we can also use the logic on this post , to show the Parent even if there is no children

    Spread the love and humanity