This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Problem with creating functional view

Hello, 

I have two object types / classes called: MainPhase and SubPhase. I want to create a view that sorts SubPhases by MainPhases. I want the structure of the view looks something like this:

  • MainPhase1   
    • SubPhase1
    • SubPhase2
    • SubPhase3
    • SubPhase4

  • MainPhase2
    • SubPhase1
    • SubPhase2
    • SubPhase99
    • SubPhase98

But the structure of the view actually looks like this:

  • MainPhase1   
    • SubPhase1
    • SubPhase2
    • SubPhase3
    • SubPhase4
    • SubPhase99
    • SubPhase98

  • MainPhase2
    • SubPhase1
    • SubPhase2
    • SubPhase3
    • SubPhase4
    • SubPhase99
    • SubPhase98


In some cases MainPhase shares SubPhases with another MainPhase. I want to find all these SunPhases at once when i search for: SubPhase = SubPhase1 for example.

Does anyone know how to create such a view? Help is much appreciated! Slight smile


Br, 
Vesa

Parents
  • Are the MainPhase and SubPhase separate object types or are they different classes of the same object type? How are you linking the SubPhases to the MainPhase? Is there for instance a property "MainPhases" on the SubPhase object?

    In my quick test with Project and Task object types, where each task can be related to multiple projects, the view behaved as it should: I could first see the list of projects and then only the tasks for that project under each project virtual folder.

    Here are my view settings:

  • Thank you Joonas for helping me out with this.

    MainPhase and SubPhase both have their own object types.
    I have "choose from a list" type of property on MainPhases metadatacard, that declares the SubPhases that belongs to that specific MainPhase ( This can be switched another way around it necessary)

    Sorry for not being clear at the very beginning:
    What our client wants is actually a view that show projects first and then Main- / SubPhases.

    Like this:

    • Project1
      • MainPhase1   
        • SubPhase1
        • SubPhase2
        • SubPhase3
        • SubPhase4
      •  MainPhase2
        • SubPhase1
        • SubPhase2
        • SubPhase99
        • SubPhase98

    But view actually behaves like this:

    • Project1
      • MainPhase1   
        • SubPhase1
        • SubPhase2
        • SubPhase3
        • SubPhase4
        • SubPhase99
        • SubPhase98
      •  MainPhase2
        • SubPhase1
        • SubPhase2
        • SubPhase3
        • SubPhase4
        • SubPhase99
        • SubPhase98

    The Phases arent declared on Projects metadatacard and i dont want them to be.

    When i tried to create a view the way you suggested it seems to be working perfectly, but when i add the project to be the first "step" of the structure it messes it up. 

    The properties of the view:


    Thank you once again Joonas. :)

  • Usually you would have the child object (SubPhase) point to the parent object (MainPhase) but it might work also the other way around if you select the "From" reference direction in the MainPhase grouping level. This means that the reference between the objects is FROM the MainPhase to the SubPhases.

    You can find a more detailed description and examples on how the reference direction works in the user guide: https://www.m-files.com/user-guide/latest/eng/grouping_levels.html (Finnish version: https://www.m-files.com/user-guide/latest/fin/grouping_levels.html)

  • Thank you so much, i'll giving it a go :)

  • Is there a way to set multiple owners to created object (I've set the Hierarchy between subPhase and MainPhase)? This method seems to be working perfectly, but i need to set multiple owners for example for SubPhase1 (Owners would be MainPhase 1 and MainPhase2)

  • for clarification:
    When creating SubPhase - it asks Owner (MainPhase) - can i anyhow choose multiple owners to that? It's built-in property so it doesnt allow me to change it to:choose from list (multiple values)

  • If you use the Owner property, there can only be one owner. You should instead use the MainPhases property that was automatically created when you created the MainPhase object type, it's of type "Choose from list 'MainPhases' (multi-select)" so you can choose multiple values.

    If it seems that using the Owner property is mandatory, the SubPhase is marked as a sub-object of a MainPhase. Remove this linking from the object type settings, Advanced tab, so you can use the other property instead.

Reply
  • If you use the Owner property, there can only be one owner. You should instead use the MainPhases property that was automatically created when you created the MainPhase object type, it's of type "Choose from list 'MainPhases' (multi-select)" so you can choose multiple values.

    If it seems that using the Owner property is mandatory, the SubPhase is marked as a sub-object of a MainPhase. Remove this linking from the object type settings, Advanced tab, so you can use the other property instead.

Children
No Data