Symbolic field not updating (OpenInsight Specific)
At 05 DEC 2001 04:40:00PM a becker wrote:
I have an edit table in which the 4th column is a symbolic field.
The user orders a number of supplies entering how many they wish. There are times when the item ordered will be in groups, example - the user orders 1 and they actually will receive 3. The row for that item will calculate (in the 4th column) the actual amount the user will receive.
Upon a lostfocus event, we check the order against the inventory and if the amount requested (column 4) is greater than what is in stock, an informational message is displayed, that row is deleted from the table and the rest of the order is checked as described above.
The problem: If an row is deleted, row 1 for example, row 2 is moved to row 1 BUT the 4th column does not recalc. If the orginal first row had 200 in the 4th column and is deleted, the new 1st row contains 200 in the 4th column even if it should be another amount. Saving it as such and retrieving that record comes out all right.
Any idea as to how we can get that 4th field to change to the correct amount? We have tried send_message(@window,"Calculate","column 4) and "redraw" without success.
Thanks in advance for you suggestions/solutions.
Andy Becker
IL State Lottery
At 05 DEC 2001 06:02PM Oystein Reigem wrote:
Andy,
Not Send_Message, but Send_Event. And the CALCULATE event must be sent to the edit table, not the window. And the last parameter must be the number of the column, in your case 4:
Status=Send_Event( @Window:".YOUREDITTABLE", "CALCULATE", 4 )
If it still doesn't work it could be because the way you update the edit table doesn't "go deep enough" boundvalueswise. Do you use Send_Message "DELETE" to delete your row? That might be all right - I can't really tell. But if you use Set_Property to change the content, then read to see which properties to use and not to use.
- Oystein -
At 06 DEC 2001 03:11AM James Birnie wrote:
Also, if you do want to make changes following row deletions use the DELETEROW event within the table control.
At 06 DEC 2001 09:20AM a becker wrote:
Thanks Oystein and james
I'll give it a shot
Andy