Florin M.
Florin M.

Reputation: 2169

Copy value formula from one field to another in different forms - LOTUS NOTES

Is it possible to assign to a field from a form a value stored in a field on a different form? Eg: txt_Name is on form_MAIN and txt_LastName is on form_SECOND.

I tried: ( on the Window Title on the form_MAIN ) ( the field "text_uniqueid" contains @Text(@DocumentUniqueId)

FIELD OldOrderNumber := @GetField("text_uniqueid");

and then I wanted to see if I can see the variable's value on the second_FORM:

@Prompt([Ok];"title";OldOrderNumber) 

but the result is null.

In other words, what I want to do is: To copy the unique id of the main form to a field situated on the second form.

Upvotes: 0

Views: 3890

Answers (1)

Anders Lindahl
Anders Lindahl

Reputation: 42870

@GetField can only get values from the current document. To fetch a field value from another document you need to use @GetDocField and supply the UNID of the document you want to read from.

@GetDocField

Given the unique ID of a document, returns the contents of a specific field on that document. The document must reside in the current database.

Syntax

@GetDocField( documentUNID ; fieldName )

Upvotes: 1

Related Questions