Hi Adam,
This function should work for you.
In this case, what it's doing is finding nodes of type "GUIDELINE_TYPE.E55"
within each "GUIDELINE.E89" instance.
-Alexei


Director of Web Development - Farallon Geographics, Inc. - 971.227.3173

On Mon, May 2, 2016 at 7:54 AM, Adam Cox <[email protected]> wrote:

> Hello all, working on customizing one of the wizard forms, and have come
> up against a wall...
>
> At first I was trying to make a branch within the form that had an image
> with extra info attached to it, i.e. multiple images each with a note and
> type attached to it.  I gave up on that, and thought I could just make a
> simple two node branch within the form, so there would be multiple
> note/note type pairs per each overall form instance.  However, I'm finding
> that the structure of the branch is not preserved when I save multiple
> instances--one of the nodes ends up in the wrong branch.
>
> I was just looking at this function that is defined in the form class
>
>     def get_nodes(self, entity, entitytypeid):
>         ret = []
>         entities = entity.find_entities_by_type_id(entitytypeid)
>         for entity in entities:
>             ret.append({'nodes': entity.flatten()})
>         return ret
>
>
> and is called for each branchlist like so:
>
> condition_assessment_entities = self.resource.find_entities_by_type_id(
> 'GUIDELINE.E89')
>
> for entity in condition_assessment_entities:
>       self.data['data'].append({
>           'GUIDELINE_TYPE.E55': {
>                 'branch_lists': self.get_nodes(entity,
> 'GUIDELINE_TYPE.E55')
>            },
>        })
>
>
> Does this function impair what I'm trying to do?  It seems like it might
> make complex branching underneath the main branch impossible.
>
> Any thoughts would be greatly appreciated.
>
> Adam
>
> --
> -- To post, send email to [email protected]. To unsubscribe,
> send email to [email protected]. For more
> information, visit https://groups.google.com/d/forum/archesproject?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Arches Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- To post, send email to [email protected]. To unsubscribe, send 
email to [email protected]. For more information, 
visit https://groups.google.com/d/forum/archesproject?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to