Hi
You can also make use of the SetRecFilter.
RecVariable.Init();
.
.
.// Assign the values to the RecVariable
.
RecVariable.SetRecFilter();
If RecVariable.IsEmpty() then
RecVariable.Insert() // Insert the record if hasn't found
Else
RecVariable.Modify(); // Modifies the existing record (if any changes).
Regards
Avinash B