Not a Parent function?

I have a line item with a list format where the items contains some parents. Eg. List contains Parent: Sector A with Child Material A, Material B and Material C Parent: Sector B with Child Material D, Material E I want to either 1) allow the selection to excludes any parent items, (Select Only Material A, Material B, Material C, Material D and Material E) or 2) Build a validation item to check if the selected item is not a parent item (Not Sector A or Sector B ) This is to to ensure that the selected item can hold values. Is there any way of achieving either options?

Answers

  • Hi,
    Yes you can achieve this with filters or selections.

    Busy for the time being but I will post something more detailled tonight.
    Kind regards.
    Michel.
  • Hi,
    here are some ways that may answer your needs :

    Of course first and easiest solution is to Right Click the list in the module and Select Level to show, then unselect the parent. Only the children are displayed. But I think that this solution does not fit your need thus here are some others.


    1) allow the selection to excludes any parent items, (Select Only Material A, Material B, Material C, Material D and Material E)
    In your module, create a boolean line Item "show children only". Insert a formula in this line item : TRUE.
    Make sure to keep the summary option to NONE.

    Now you can filter your module on this line item : Show children only is equal to True. 
    Only children will be dislayed.
     
    2) Build a validation item to check if the selected item is not a parent item (Not Sector A or Sector B )
    Create two line items :
    First line item is named "counter level". Insert formula : 1. Thus child will have Counter Level = 1 and parent will have counter levele greater than 1 (assuming you have more than one child for parent).

    Create another line item "Color Red for parent"
    This validation item has the following formula : if Counter = 1 then 0 else 1
    Make sure to swith the summary option to FORMULA instead of SUM for this line item.

    Then in your module, create a conditional formatting on the relevant line items (amount, quantity, ....) , based on the value of the Color line item.
    select 2 colors : white / red.
    Minimum value = 0 and maximu value = 1

    The relevant line items will be colored red for parents and will stay white for children.

    That's basically the STRUCTURE of what may be implemented. Now you have to customize theses ideas in order to fill your specific need.

    Kind regards.
    Michel.



     
  • Hi.
    Thanks for the suggestions.
    My module do not have the List as a dimension.
    It only contains a line item formated as a list for user to select the required item in the list. Therefore the suggestions does not work.

    Think of the module with only one line item (Selected Material) and no other dimension.
    The line item selected material is formatted as a list (Material)
    The list Material has 2 parents and 5 materials as follows:
    Parent: Sector A with Child Material A, Material B and Material C
    Parent: Sector B with Child Material D, Material E

    Based on your suggestions, I tried to add a property called child counter with value of 1 and in my module, I added a new line item called check child counter formatted as number. Is there any formula I can use that can retreive this child counter value from the list? I tried =Material.Child Counter, but it does not work as the Material list is not part of the dimension used in the module.

    Regards,

    Yi Ping
  • Hi,
    sorry for my misunderstanding. There are basically 2 possibiities.

    Option 1:  Parent and chidren are two different lists (with parent of course being parent list of children).
    Create 2 lines items: first line item is formated on the parent list. The user first select the parent.
    Second line item frated on the children list, WITH DEPENDENT selection. When the user has selected the parent in the fist line item, only the chldren are displayed and can be selected in this second line item (if fact the parent is aslo displayed but cannot be selected).

    The key here is to use the dependent selection.


    Option 2: Create a list with only the chidren, not the parent, with the same codes and display name than the Original list. This duplicate list will be used only for selection in drop down boxes.
    Format the line item for user data entry on this duplicate list. No parents will be displayed.
    Thus you make the user select the relevant element in children ony
    Create another line item, hidden, whith the formula "FINDITEM(Orignal Parent Children List, CODE(user data entry line item)).

    There you will have only children seleted in the original list.

    However it requires maintenaing two lists. That may be an issue in some context.

    I can think on other possibilities but for the time being you can start with trying one on these two.

    Kind regards.
    Michel.