Skip to main content
April 16, 2024
Question

Reviewing the "context" of a list action for debugging

  • April 16, 2024
  • 6 replies
  • 0 views

I am attempting to debug an error that's popping up in a record list action that involves copying an externalized string representing a record, then writing the record to the database, either for a new record or an update to an existing one. The error below appears as soon as I copy the externalized string into the paragraph field, but only when I run the list action from my site. When I attempted to debug the issue in the interface editor, the saveIntos on the paragraph field run as intended. Normally when I run into an issue like this I assume that the variables being passed into the process start form are different than the test values in the interface editor, but this process model only occurs as a record list action, so there is no context being passed into the process, and no process variables have a default value. I can't figure out where in the application there would be any changes to the process variables that would cause this difference. For reference I've also included the segment of code that the error refers to

    6 replies

    karumurua531442
    April 16, 2024

    hi [mention:3051093f1f3e466d9fd759a43d936ad7:e9ed411860ed4f2ba0265705b8793d05]  the error image is not clear could you reupload the image using this steps please

    April 16, 2024

    karumurua531442
    April 16, 2024

    hi [mention:3051093f1f3e466d9fd759a43d936ad7:e9ed411860ed4f2ba0265705b8793d05]  could go please through this link once: a!queryRecordByIdentifier() and check are you following the right procedure while using this function please

    konduruc733182
    April 16, 2024

    Your error screenshot is unclear. But from what I understand you are trying to run your queryRecordByIdentifier in saveInto parameter of your paragraphField. Please paste the complete code snippet of what you have configured.

    April 16, 2024

    Below is the full saveInto for the paragraph field:

    {
    local!importedString,
    a!save(
    local!externalizedString,
    internalize(save!value)
    ),
    if(ri!isImportForOffline,
    a!save(
    ri!interdictionCDT,
    cast(
    typeof('type!{urn:com:appian:types:MR}MR_Interdiction_Case_Offline'()),
    if(length(local!externalizedString) = 1,
    local!externalizedString,
    index(local!externalizedString, 1, {})
    )
    )
    ),
    a!save(
    ri!interdictionRecord,
    cast(
    a!listType('recordType!{67651d12-dcb7-44ce-a913-b0cadf64ff1d}MR Interdiction Case'),
    if(length(local!externalizedString) = 1,
    local!externalizedString,
    index(local!externalizedString, 1, {})
    )
    )
    )
    ),
    if(ri!isImportForOffline,
    a!save(
    ri!migrantsCDT,
    if(a!isNullOrEmpty(index(local!externalizedString, 2, {})),
    {},
    cast(
    a!listType(typeof('type!{urn:com:appian:types:MR}MR_Migrant'())),
    remove(
    local!externalizedString,
    1
    )
    )
    )
    ),
    a!save(
    ri!migrants,
    if(a!isNullOrEmpty(index(local!externalizedString, 2, {})),
    {},
    cast(
    a!listType('recordType!{67651d12-dcb7-44ce-a913-b0cadf64ff1d}MR Interdiction Case'),
    index(local!externalizedString, 2, {})
    )
    )
    )
    ),
    a!save(
    local!existingInterdictionId,
    if(
    ri!isImportForOffline = true,
    if(
    a!isNullOrEmpty(ri!interdictionCDT),
    {},
    if(
    contains(
    tointeger(ri!allinterdictionCDTData.id),
    tointeger(ri!interdictionCDT.id)
    ),
    ri!interdictionCDT.id,
    {}
    )
    ),
    if(
    a!isNullOrEmpty(ri!interdictionRecord),
    {},
    a!queryRecordByIdentifier(
    recordType: 'recordType!{a5a5873d-2b04-4d43-9681-a90d71fa6188}MR Migrant',
    fields: {
    'recordType!{a5a5873d-2b04-4d43-9681-a90d71fa6188}MR Migrant.fields.{4b50ae43-1e2b-4abe-98ab-825728c48af0}id'
    },
    identifier: ri!interdictionRecord['recordType!{a5a5873d-2b04-4d43-9681-a90d71fa6188}MR Migrant.fields.{4b50ae43-1e2b-4abe-98ab-825728c48af0}id']
    )
    )
    )
    )
    }

    shubhama926776
    Brainy
    April 16, 2024

     [mention:3051093f1f3e466d9fd759a43d936ad7:e9ed411860ed4f2ba0265705b8793d05] :  Based on error screenshot looks like your ri!interdictionRecord is not type of MR Migrant Record.
    Validate that once.

    शुभम्