How to refresh forms field

This is my web application. I have a computed field on the form which has a formula

@DbCommand( “ODBC” : “NoCache” ; “hh” ; “pp” ; “pp” ; “select nvl(max(DOC_NO)+1,100001) from abc”)

now when I am opening the new document field is taking the preious value. It is not refreshing. If suppose I saved Doc_no=100008 previously in database and when I again opening the new document it shows 100008 value on the field. But after refreshing manually it executes the formula and show the doc_no=100009.

Subject: how to refresh forms field

You could try retrieving hte last value with an @DBlookup and adding 1 to it.

Shawn

Subject: RE: how to refresh forms field

Never mind…I see that is what your trying to do.

I apologize for not looking more closely at the code you posted.

Try this

@command([viewRefreshFields]);

Shawn

Subject: RE: how to refresh forms field

where should I have to given @command([viewRefreshFields]) formula as I have given @dbcommand is at the field default value.