generage document

I use the download function generate document to find that sometimes the downloaded content is incomplete, sometimes it is complete. How to deal with this problem   when i download list, sometimes is complete  sometimes is incomplete  
3 answers

What do you mean when you say that it is "incomplete"? Have you tried adding a breakpoint to your microflow, before the document is generated? Maybe you have a data problem and you have some empty objects?


In your retrieve of CareQuestion you have the following XPath;[PatientModule.Intervention_CareQuestion/PatientModule.Intervention/id != empty]

FYI; the id is set by Mendix and will never be empty. So this path doesn't make sence.

Furthermore; if I take a look at both retrieves for a list; if the returned list is different then you expect; then it's probably your data. not the retrieve, the document template or the download. 

I suggest the following learning path to start with;




Can you share a screenshot of your document template?




Ok, just to be sure I understand the problem:

  1. You retrieve a number of records in the microflow
  2. You confirm (via debug) the records that are retrieved and should be in the document
  3. You have confirmed that the user has permissions to see all of the retrieved records
  4. Sometimes all of those records appear in the generated document
  5. Sometimes only some of those records appear in the generated document

If that is accurate, perhaps there is some content in one of the records that causes a problem when the document is generated.  To confirm if this is the case, you could create a number of records with simple, unformattted content, and retrieve varying numbers of those records, then pass those into the document template (5, 10, 15, 20, etc.) .  If you determine it might be the content of one of the records, you could retrieve the existing records and then pass lists into the generate document action until you get to the record that is causing a problem (i.e. retrieve the first record, pass it in, retrieve the first and second records, pass them in, and continue until you get to the record that causes an issue).

Hope that helps you find the problem.