Page 1 of 1

RefreshRecord, Options.FullRefresh BUT not all Fields?

Posted: Mon 05 Nov 2012 22:44
by dschuch
Hy, we have a very complex query. Its created in a way, the user can modify records. So after Post we need to RefreshRecord because of some Database Action.

The Problem:

We need to FullRefresh, because there are Functions in the Query that need to be refreshed.
BUT there are also Window-Funtions in the Query, e.g. (exakt content doesnt matter)

Code: Select all

CAST(row_number() OVER(PARTITION BY date_to_yearmonth(date)=date_to_yearmonth(COALESCE(ldate, date)) ORDER BY COALESCE(ldate, date), field1, pos1) AS INTEGER) AS row_number,
So refreshrecord kills our RowNumber, its clear: refreshRecord selects just one record, so the backend returns the result for 1 record.

Is there is a way to handle this? Can i explicit EXCLUDE fields from the RefreshRecord-Procedure on some way?

Re: RefreshRecord, Options.FullRefresh BUT not all Fields?

Posted: Tue 06 Nov 2012 14:28
by AlexP
hello,

Analytical functions compute values after retrieving all the query data, therefore, if in the query there is a WHERE section with limitation on record set, the values of an analytical function will be computed after the WHERE section is applied for the retrieved data. Therefore, in this case, you should explicitly call full Refresh, e.g. in the AfterPost event.