Reviewing the "context" of a list action for debugging

Certified Associate Developer

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

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    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.

  • 0
    Certified Associate Developer
    in reply to Konduru Chaitanya

    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']
    )
    )
    )
    )
    }

Reply
  • 0
    Certified Associate Developer
    in reply to Konduru Chaitanya

    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']
    )
    )
    )
    )
    }

Children