Domino Code Fragment

Code Name*
Updating Parent when Child changes A Notes formula for updating parents when a child
changes in Notes R3/4.
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.18.119.139.104
Description*
Updating Parent when Child changes A Notes formula for updating parents when a child changes in Notes R3/4.
Type*
Formula
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
Both parents and responses share a common key, the parent's DocID is
stored in each response document in a field called $REF.  We can use
this common key in a hidden view, call it (Parents by DocID), which
contains the following formula in the first sorted column (this
column can be hidden):


     @Text(@DocumentUniqueID)

Now when someone updates a response document, you can use the
following formula in the Save/Close button to quickly open the
(Parents by DocID) view to the key that matches the $REF in the
response document.  Then we can refresh the parent, and/or run a
macro on it, and then close the view...

    view := (Parents by DocID);
    key := @Text($REF);
    REM;
    REM;
    @Command([FileSave]);
    @Command([FileCloseWindow]);
    @Command([OpenView]; view; key; "1");
    @Command([EditDeselectAll]);
    @Command([ToolsRunMacro]; "(Set to Filled)");
    @Command([ToolsRefreshSelectedDocs]);
    @Command([FileCloseWindow]);


By the way, the @DocumentUniqueID function is not documented and is
not supported on the Macintosh platform in Notes V3, but it is fully
documented and supported in Notes V4.