Share this page

# lrt_ClarifyCorrelate

Correlating Functions

Saves data returned from the database for correlation when using Clarify.

void lrt_ClarifyCorrelate( void *buf, int occurrence, char *param );

buf | The name of the buffer containing the response
occurrence | The number of times the service has been called (a zero-based index)
param | The name of the parameter to store the data

lrt_ClarifyCorrelate is automatically generated by Vugen when using the Clarify CRM application and saves data that was returned in the reply buffer of a DB_OBJNUM or DB_OBJIDS call to the database. The data is used for correlation.

buf is the name of the reply buffer whose data is saved for correlation. It is the same buffer sent as the odata argument of lrt_tpcall.

## Return Values

This function has no return value.

## Parameterization

Parameterization is not applicable to this function.

## Example

The following example sets a buffer, data_0 before sending it in a DB_OBJNUM call to the database. The first call to lrt_Fadd32_fld adds a field indicating there will be only one field to correlate ("field=1") and the second sets the data value to 2099.

The client then sends a DB_OBJNUM call in the function lrt_tpcall, which fills in the return buffer data_1. The lrt_ClarifyCorrelate function saves data_1 to a parameter, OBJID0. When the next call is made to the server, the saved correlated value is sent along with the old value of 2099.

Copy code

    lrt_Fadd32_fld((FBFR32*)data_0, "id=33554537", "value=1",
        LRT_END_OF_PARMS);
    lrt_Fadd32_fld((FBFR32*)data_0, "id=33554537", "value=2099",
        LRT_END_OF_PARMS);
    ...
    tpresult_int = lrt_tpcall("DB_OBJNUM", data_0, 0, &data_1, &olen, 0);
    // Save the data in data_1 to OBJID0 parameter
    lrt_ClarifyCorrelate(data_1, 0, "OBJID0");     ...// Before making next call to database using the data value of 2099, include
    // the correlated value OBJID0
    lrt_Fadd32_fld((FBFR32*)data_0, "id=33554537", "value=2099",
        LRT_END_OF_PARMS);
    lrt_Fadd32_fld((FBFR32*)data_0, "id=33554537", "value=<OBJID0>",
        LRT_END_OF_PARMS);
    // Now make next lrt_tpcall to the server

Example: The following is now part of the contents of the returned FML32
buffer data_1:
field: "id=33554537", "occurrence=0", "value=93"

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: