Hi Bengt,
No need for such a function in the application since the Notes Client is quite capable:
1-Create yourself an additional Toolbar Button and use the following formula in it
@Command([ToolsRefreshSelectedDocs])<br/>
2-Switch to a view of all Annual Leave Allowance documents
3-Select all documents
4-Click your new button
All documents will then be recalculated and all new fields will populate.
You can now use this button whenever you need to recalculate documents in any application.
HTH,
Bob