Re: New Era problem
Posted in 1997
In article <E46E5CF62400D11186D700A0244D023C032AC8@DILBERT>, Leon Feijtel <LeonF@faapartners.com> writes >Does anybody know what the function getAlteredValue can be used for. It >is introduced as a member >of the ixSuperTable in version 2.2, but it is not documented. Hello, I've used the function getAlteredValue in a supertable. Documentation for it is detailed in the NewEra 2.2 Supplement icon. It is used in conjunction with the event userValidateData. What happens is that if a value in a cell is changed from the original value retreived but is invalid, the function getAlteredValue allows for the original value to be edited into the cell on error. Documentation. FUNCTION ixSuperTable::getAlteredValue() RETURNING ixValue This function retrieves the value stored in the cell before any calls to the userValidateData( ) event are made. Unlike getCellValue(), the getAlteredValue() function can be used in the userValidateData( ) handler to return the value the user entered in the SuperField before the userValidateData( ) event was called. Figure1 illustrates the differences between getOriginalValue(), getCellBuffer( ), getCellValue(), and getAlteredValue() when used with the afterDataChanged( ) and userValidateData( ) events. Figure 1 The boxes in Figure1 represent a SuperField. The first and second pass represent the two times a user modified the data in the SuperField. The X, Y, and Z represent the different data the user entered. The steps A through D indicate phases in which the getOriginalValue(), getCellBuffer( ), getCellValue(), and getAlteredValue() functions can be applied. Step Description A Data is retrieved from the database into the SuperField. B User enters a value. C User tabs out of the SuperField, focus moves out of SuperField. D Focus returned to the SuperField because of invalid data. The following table summarizes what value each function returns in each step in the process of modifying data in the SuperField on the first pass. First Pass Function Name Step A Step B Step C Step D getOriginalValue() X X X X getCellBuffer() X Y Y Y getCellValue() X X X Y getAlteredValue() X X X X The getCellValue() function returns X before the afterDataChanged() and userValidateData( ) events are called in step C. During the call to these events and after these events are called (step D), the getCellValue() function returns Y. The getAlteredValue( ) function returns X before, during, and after the call to the userValidateData( ) event (steps C and D). The following table summarizes the values returned on the second pass through updating the same SuperField. On this pass, no data is retrieved from the database a second time; therefore, no step A is listed in the table. Second Pass Function Name Step B Step C Step D getOriginalValue() X X X getCellBuffer() Z Z Z getCellValue() Y Y Z getAlteredValue() Y Y Y Bye for now Correct spelling in 'excelsys' to 'excelsis' for e-mail.