Get All Responses Using Formula

Using formula I can create a nice breadcrumb in my web application doing something like the below. This formula takes the UNID of it’s parent and works backwards until it reaches the very top parent:

parentUNID:=@Text($REF);

titleList := “”;

UNIDList:=@Text($REF);

@While( (parentUNID != “”) ;

titleList:=@GetDocField(parentUNID;“Title”): titleList;

UNIDList:=@Text(@GetDocField( parentUNID ; “$Ref” )):UNIDList;

parentUNID := @Text(@GetDocField( parentUNID ; “$Ref” ))

);

However, is it possible to do this the opposite way, that is, can I create a list of reponse document information given a parent UNID and work down instead of up?

Subject: Get All Responses Using Formula

@docchildren@docdescendants

Subject: RE: Get All Responses Using Formula

Cheers for your post Yazdi.

You do realise you can only use @DocDescendants and @DocChildren in window title and column formulas.

I guess I didn’t myself clear in my original post. I’m doing this on a form in a computed value. My bad.

Subject: RE: Get All Responses Using Formula

i had done something similar long time back

Store the unid or noteid of the parent document in a separate field, this field inherits to all children,

Every time a child doc is create append the current parents unid or noteid to this list either as a list or as a string

have a view that sorts on the this field and search for it by using the unid or noteid of the topmost parent as key

Subject: Get All Responses Using Formula

The same idea, but:1. You can use the view with all responses you need and first column of @Text( $Ref ) and @DbLookup

  1. This is a bit more complicated to going down the tree then going up