You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Objects who defines the fields where 'targetTable' will reply bitacora fields (If targetTable is null it's ommited)
targetTableUpdateFieldsCondition
A
null
Fields array to define update condition (each value must to be passed as parameter with the same field name)
paramDef:
property
type
default value
use
name
T
name of the parameter that is sent to the procedure
defaultValue
según typeName
parameter default value
typeName
T
to define the data type
label
T
name
if you don't want to use default value to display on screen
coreFunction(context, parameters)
context
uso
be
backendApp object
username
username
Process definition example:
{action:'count_without_isotopes',bitacora:{error:true,always:true,targetTable:'other_table',targetTableBitacoraFields: {init_date: 'fecha_hora_inicio',end_date: 'fecha_hora_final',has_error: 'hubo_error',end_status: 'resultado'},targetTableUpdateFieldsCondition: ['id']},parameters:[{name:'first_atomic_number',defaultValue:10,typeName:'integer'},{name:'last_atomic_number',defaultValue:99,typeName:'integer'},],coreFunction:function(context,parameters){returncontext.client.query(`SELECT count(*) as number_of_elements FROM ptable p left join isotopes i on p.atomic_number=i.atomic_number WHERE i.atomic_number IS NULL AND p.atomic_number between coalesce($1,0) and coalesce($2,999)`,[parameters.first_atomic_number,parameters.last_atomic_number]).fetchUniqueRow().then(function(result){returnresult.row.number_of_elements;});}},