I have three forms each with a text box (computed) to display a ref number. I have used the @unique formula to randomly generate a new ref number each time a form is composed.
Can anyone tell me how to display the same reference number from the newly composed document onto the remaining two forms. I have tried the following but it doesnt appear to work:
I’d be interested to see how you create unique ref numbers with @Unique…
In order to pull data from one document into another, you’d need to either know the document ID of the ‘document that sets the unique number’ or do some kind of DbLookup.
If documents 2 and 3 can’t figure out how to find document 1, then you’re out of luck.
If you need to create all three docs at the same time, I’d think about using LS to just whip up all three at one time.
Without more information on your doc creation workflow, it’s hard to offer much else.
There are tons of postings here and in the 4/5 forum on how to create unique and/or sequential numbers, you may want to spend some time searching both forums for other ideas.
It’s easy to create unique numbers with @Unique… Try @Unique with no parameters. It gives a number which is a combination of the date/time plus user initials. It’s theoretically possible to get non-unique numbers using this formula but in practice I’ve never seen that happen.
If you have three documents created with three different forms and you want all three documents to display the same ref number, then you either have to use inheritance, or a lookup from child doc to parent doc (using @GetDocField), or you have to script the creation of the second and third document and have the script explicitly set the NotesItem value. The simplest way is with the inheritance property set on the 2nd and 3rd forms, and the default value of the URef field set to URef (with no quotes) on those forms.