Skip to content

CurrentRowId - BaseData_Set

Returns the RowId of the current record

Type: Function
Return Data Type: RowID

Syntax

Function CurrentRowId Returns RowID

Call Example

Get CurrentRowId to RowIDVariable

Description

Syntax

RowId riRow
Get CurrentRowId of hoDDO to riRow

CurrentRowId is used to obtain the current record identity (RowId) of a Data Dictionary Object (DDO). This function can be used store a DDO's record identity so that the record can be refound at a later time.

Procedure ProcessInvoices
    RowId riCurrentInvoice

    Get CurrentRowId of oInvoices_DD to riCurrentInvoice
    Send RunInvoiceReport
    // assume that running this report may change the current record of the DDO
    // therefore we will restore the DDO back to the record we started with  
    Send FindByRowId of oInvoices_DD Invoices.File_number riCurrentInvoice
End_Procedure  // ProcessInvoices

Note that this function returns a RowId data type and that the variable receiving this value must be a RowId variable.

If the DDO does not contain a current record, a Null RowId value will be returned.

Procedure CheckRecord
    RowId riCurrentInvoice

    Get CurrentRowId of oInvoices_DD to riCurrentInvoice
    If (IsNullRowID(riCurrentInvoice)) begin
         Error DFERR_OPERATOR "There is no Record to Process"
    End
    Else Begin
        Send ProcessRecord riCurrentInvoice
    End
End_Procedure  // CheckRecord

You can also use the HasRecord function to determine if a DDO contains an active record.

See Also

HasRecord | FindByRowId

Return Value

Returns the DDO's current record identifier