how do i pass a project number to filter the file manager?

0
I have a project form with a project number with a single to man relationship with a documents entity.  In other words, i have a list of projects and each project will have many attachments.  From the "new Project" , how do i pass the Project number to the file manager using a button?   I have created a button labeled file with the "onclick" assgined to a microflow  the microflow end point returns the project number.   how does the filemanager accept the project number parameter to filter the files by the project number?  I tried using Xpath but is till don't see a way of accepting the parameter.     Please advise   
asked
4 answers
0

The page you showed above is set up correctly.

To display a list of attachments for a single project, build the Attachments page like this:

  • Place a Dataview on the Attachments page - select the Project entity as the datasource for this dataview.
  • Inside of that Dataview, place a Datagrid.  You can select Attachment via the association to Project as the datasource for this Datagrid.  This will display a list of Attachments for the Project passed into the page.
  • Finally, open the Attachments page using the button highlighted in your screen shot above.  This will pass in the Project you've selected on the Projects page to the Attachments page and Mendix will retrieve all Attachments for this individual project.

Hope that helps. 

.

answered
0

Phillip,

If your domain model looks like this:

And you have a Project list page like this:

You can create a page like this that will be opened by the View Documents page highlighted above:

I have highlighted the association used to retrieve the documents in the nested datagrid.  The object passed to this page from the Project List page is an individual project.  Mendix knows which documents to retrieve based on the associations between a document and a project.  So you don't need to pass in a project id, but instead a Project object. 

 

Also, because the nested datagrid for documents uses an association to retrieve documents, any documents created by the New button on that grid will be associated to the Project object of the enclosing dataview.  In other words, if I pass Project ABC into the page that displays the documents, any documents created on that page will be associated to Project ABC without a developer having to perform any additional steps.

Hope that helps,

Mike

answered
0

I think i'm missing how to correctly do a nested data grid to get the relationship to show up in my connector 

I'm trying to figure out how you got the outer frame to say 'Project, Page Parameter '

 

answered
0

Thank you, that worked!

answered