0 pts.
 Assigning Sequential Numbers to Response Documents (Notes 5)
Hi I need to assign sequential numbers to response documents, the first child would be R1, the second R2 and so on, but am not sure how to do this.. Any ideas would be greatly appreciated. Kate

Software/Hardware used:
ASKED: November 17, 2005  6:48 AM
UPDATED: November 21, 2005  10:07 AM

Answer Wiki:
Try using something like @Rightback(@DocNumber;".") for the #.
Last Wiki Answer Submitted:  November 17, 2005  8:47 am  by  Stiletto   2,700 pts.
All Answer Wiki Contributors:  Stiletto   2,700 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

If the responses are created from the parent doc, you could use a field on the parent doc to store the last number used. Then when a new response is created, it could take that number, increment it by 1, write it to the response and back to the parent, and save both docs.

 0 pts.

 

Hi Kate, I was working on this last week and thought I’d post my solution, though it’s been described generally already.

On the parent document create two fields

DOCUNID calculated on compose – formula

@TEXT(@DOCUMENTUNIQUEID)

NUM numeric field defaulted to 0

On the child document, set the “Formulas Inherit Values….” option on the Form and create two new fields.

PDOCUNID calculated on compose – formula DOCUNID

CNUM calculated on compose – formula

temp:=@getdocfield (PDOCUNID;”NUM”)+1;
@setdocfield(PDOCUNID;”NUM”;temp);
“R”+@text(temp)

If yopu have any trouble with it just let me know.

John

 0 pts.

 

Great, thank you all for your help, I’ve got it sorted now

 0 pts.