0

How to display subtable of subtable on master table form?

Folks.. Using the project template database as an example, if I add mulitple sub projects to the sample Garden Design project.. and add multiple tasks to each subproject,  how would I build a view layout element that displays all tasks assigned to a project?

allTasks

8 replies

null
    • Mconneen
    • 6 yrs ago
    • Reported - view

    OK.. I figured it out.. Not sure why it did not work before..  Here is the view / formula..
    (select 'Sub Project').Task
    allTasks

    • Mconneen
    • 6 yrs ago
    • Reported - view

    Well.. only partially figured it out.. Still need to work on the filter / where clause. 

    • Mconneen
    • 6 yrs ago
    • Reported - view

    Well.  I got stuck again..:(    This will give me the tasks only for Projekt.Id of 2 .. which is Arina's Pool.
    (select 'Sub Project')[Projekt = 2].Task

    What I am having trouble figuring out is.. How do I reference the Id of the currently visible / selected Projekt row??  I have tried. 
    (select 'Sub Project')[Projekt = Id].Task
    (select 'Sub Project')[Projekt = this.Id].Task
    (select 'Sub Project')[Projekt = Projekt.Id].Task

    • Stephen_Schroeder
    • 6 yrs ago
    • Reported - view

    this worked for me where I wanted to show order for a specific customer: select 'Tasks' where Project.Id = (input the project's id) That's rather manual, but maybe this would work: let theid:= id select 'Tasks' where Project.Id = theid

    • Mconneen
    • 6 yrs ago
    • Reported - view

    Thanks Stephen.. I did figure out to use the Select statement. and Yes.. If I hard code the Projekt.Id .. it works.. What I am trying to figure out is ... If I am currently positioned / viewing the Projekt Record that has Id 2... When I add a layout element of "view" ... this.Id should be 2.  Putting that in my formula does not filter to the proper task rows. 
    allTasks

    • Sakshi_Singh
    • 6 yrs ago
    • Reported - view

    Hi Mconneen,

    Could you please your query to support@ninoxdb.de. We should be able to help you.

    Regards,

    Sakshi-Ninox

    • Mconneen
    • 6 yrs ago
    • Reported - view

    OK.. Will do.. but it is pretty simple.. Using the Project template database... Add a view of to the Project form.. I want to display Tasks associated to the seleced project (via the projects sub projects)..  I will email the database.   I suspect I do not understand how the links are working. :( 

    • Mconneen
    • 6 yrs ago
    • Reported - view

    OK.. Got a reply from support..   THANK YOU FOR PROMPT REPLY!  AWESOME!

    So... I was all around it.. The part I missed was the data type of "Id"..   Here is their reply..   I highlighted the key! ;) 

    Try it like this:
    - Open the Project form.
    - Swtich to Admin Mode.
    - Select the properties of the 'Tasks' view.
    - Change the formula like this:
    –––
    let myID := number(this.Id);
    (select Task)['Sub Project'.Projekt = myID]
    –––

Content aside

  • 6 yrs agoLast active
  • 8Replies
  • 4442Views