gcatnine

How to keep active the same record in a set of records, after it found a subset of them.

Discussion created by gcatnine on Mar 8, 2012
Latest reply on Aug 14, 2012 by Claw'd

The problem is quite simple:

I have a set of records and one of these is the active record.

I perform a find to select a subset of these records.

If the previous active record is in the new found set, I want that it remains the active record.

The only solution I found is to memorize the ID of the actual record; perform the find and then loop to the records until I find it:

 

$actual_ID = My_Record_ID

Perform find

Loop

Exit Loop if (My_Record_ID = $actual_ID)

Go to record (next; exit after last)

End Loop

 

Does anyone have a better and faster solution?

Many thanks

Outcomes