Matt_Johndon
Matt_Johndon

Reputation: 204

Deleting a row from temp table

I have two grids and on a button click items move from grid 1 to grid 2. Another button removes selected items from grid 2.

The row is deleted from the screen by using:

THIS-OBJECT:ultraGrid2:ActiveRow:Delete().

However then this is saved and repoened this row still appears as it was not been removed from the temp table. The temp-table is called selectedFormula. I've tried:

DELETE FROM selectedFormula WHERE ultraGrid2 = ultraGrid2:ActiveRow.

However i get the error message "Unable to understand after "ultraGrid2 = ultraGrid2".". Does anyone one have any ideas how to remove a item from a temp-table in Progress using ABL?

Any help will be appreciated.

Upvotes: 2

Views: 4024

Answers (1)

sbrisson
sbrisson

Reputation: 346

You will need to get the unique key from the active row in the UltraGrid2. Using that key, you find the record in the temp-table and you delete it like this.

FIND selectedFormula 
    WHERE selectedFormula.[key field] = [key from UltraGrid2]
    NO-ERROR.
IF AVAIL selectedFormula THEN
  DELETE selectedFormula.

Note: Key can be many fields, depends on your table temp-table definition and data.

Upvotes: 4

Related Questions