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
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.
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
Great, thank you all for your help, I’ve got it sorted now