A top level template grid cannot have a data source microflow

0
Hi all,  I’m using the document generator and have a template grid showing a list of objects (Entity 1). Entity 1 is linked 1-* to an image entity (Entity 2).  I’d like to have a nested template grid (showing Entity 2) within the template grid for entity 1, however, I also want to be able to constrain what images are shown using an enumeration in Entity 2.  I am trying to use a data source microflow on the nested template grid but get the following error.  “A top level template grid cannot have a data source microflow because it will retrieve its data as a parameter from the ‘generate document’ action.” I’m not sure how (or if it’s even possible) to give the original document generation microflow the parameters I need.  Using the “Select entity” to pick Entity 2 for the template grid works fine, it’s only when I want to constrain it with the microflow I get issues.  Does anyone have any suggestions? Edit:  The two template views are also wrapped in a data view which is passed its information from the microflow that generates the document. This is what it looks like.  Entity 1: “Sections” Entity 2: “PWSImages” Dataview: “Support Plans” The domain modal has; Support Plans 1-* Sections 1-* PWSImages   
asked
2 answers
1

Found it!

The nested template grid PWSImage has a entity path specified. The moment you connect a microflow as data source you do have a conflict. Datasource is a path and a microflow. 

Set the entity for the PWSImage template grid directly on PWSImage without the path from the Section entity. The datasource microflow should start with input parameter of Object Section and a retrieve action which retrieve the images from database, constraint with an XPath PWSImage_Section = $Section and the additional filter criteria.

Must be noted that the error message you do get in Studio Pro isn’t really guiding …. :-(

answered
0

*works on my machine* 

  1. I created a document template with a templategrid as top-level widget.
  2. Connected to an entity = input parameter in generation activity
  3. Added a nested templategrid in the first template grid
  4. Connected it to the required entity and set microlfow as source
  5. Return a list in microflow end point
  6. Works...

 

answered