How to Refresh a View using Formula Language?

How do i refresh the view using Formula Language on a form.

I have a field on the Form. I want the field to populate the counter number from the view. In the Default Value of the field “ctrl_no”, i have specified this formula.

Counter := @DbColumn(“”;“”;“2- Counter View”;1);

@If(@IsNewDoc;counter;ctrl_no)

Counter gets the value from the View called 2- Counter View.

It then displays it in the field. On the save of the Form, i increment the number so that next time if a new document is created it should pick up the new number from the view. Now the problem is that the view doesnt get refresh and it always picks the old value from the view. I want to refresh the view in formula language so that it can pick the new value.

Any suggestions would be higly appreciated.

Jawad Rana

Subject: How to Refresh a View using Formula Language ???

From Notes Help:

@DbColumn( class : cache ; server : database ; view ; columnNumber )

cache

String argument. Optional. In the initial lookup, specify either “” or “NoCache.” If the former case, subsequent lookups to the same data source, you can specify “ReCache.”

“” (null string) caches the results of the lookup. Each subsequent lookup to the same location (within the same Domino session and so long as the database executing this lookup remains open) reuses that data until you specify “ReCache.” Cached data improves performance and may be a good choice for stable data.

“ReCache” refreshes the cache with the latest data from the database. If you want to ensure that this lookup gets the latest information, specify this option.

Note “ReCache” is new with Release 6.

“NoCache” gets the results of the lookup from the database; no cache is used. If you want to ensure that Domino retrieves the latest information for every lookup, specify this option.

Subject: RE: How to Refresh a View using Formula Language ???

Thankyou Gregor Loetzsch. It worked and it was great help from your side.

Thanks.

Jawad Rana