Expression Evaluation error while executing Interface

The following error occurred while executing an interface rule 

 

Error: 

Expression evaluation error in rule 'hrob_surveydatareport_grid' (called by rule 'hrob_newtabledetailedreport') at function a!buttonWidget [line 8]: An error occurred while executing a save: java.lang.IllegalArgumentException: Require Writer Object

 

The Appian version is 18.1. 

Any help would be much appreciated, thanks. 

  Discussion posts and replies are publicly visible

  • Hi ,
    Please share a!buttonWidget [line 8]: code. Something went wrong while saving value on button click.
  • This code was working when the version was 17.3, could the error be due to version upgrade, also if it is, how can it be resolved? Thanks.
  • Code looks fine to me. try to save individual values to ri!TriggerExportData cdt.
  • 0
    Certified Lead Developer

    Hi  3 questions here:

    1.  What's the type of TriggerExportData rule input, is that a CDT or Any type?

    2. What's the type of RequiredDocVersion ? Is that an integer?

    3. Are you trying to perform any operation which requires writer object,  if so then you need to declare that variable in bind() first

    However it will be easy to understand this problem statement if you can share your interface code and variable types.

    Hope this will give you a clue to find out the root cause

  • 1. It is Any Type

    2. Yes, it is a Number ( Integer)

    3. No, I dont think there is any operation using a write object.

    The interface code is as follows:

    a!sectionLayout_17r1(
    label: " Report",
    firstColumnContents: {
    if(
    ri!DataSubset.totalCount = 0,
    {},
    a!buttonLayout(
    primaryButtons: a!buttonWidget(
    label: "Export to Excel",
    style: "PRIMARY",
    saveInto: {
    a!save(
    ri!TriggerExportData,
    {
    Initiator: loggedInUser(),
    RId: ri!RId,
    From_Start_date: ri!From_Start_date,
    To_Start_date: ri!To_Start_date,
    From_Completion_Date: ri!From_Completion_Date,
    To_Completion_Date: ri!To_Completion_Date,
    Division: ri!Division,
    CostCenter: ri!CostCenter,
    Requestor: ri!Requestor,
    WorkerType: ri!WorkerType,
    Status: ri!Status
    }
    ),
    a!save(
    ri!IsExportData,
    true()
    ),
    a!save(
    ri!RequiredDocVersion,
    ri!CurrentDocVersion + 1
    )
    }
    )
    )
    ),
    a!gridField(
    totalCount: ri!DataSubset.totalCount,
    emptyGridMessage: "No data",
    columns: {
    a!gridTextColumn(
    label: "RId",
    field: "RId",
    data: index(
    ri!DataSubset.data,
    "RId",
    null
    )
    ),
    a!gridTextColumn(
    label: "Start Date",
    field: "Start_Date",
    data: index(
    ri!DataSubset.data,
    "Start_Date",
    null
    )
    ),
    a!gridTextColumn(
    label: "End Date",
    field: "Completion_Date",
    data: index(
    ri!DataSubset.data,
    "Completion_Date",
    null
    )
    ),
    a!gridTextColumn(
    label: "Worker Name",
    field: "Worker_Name",
    data: index(
    ri!DataSubset.data,
    "Worker_Name",
    null
    )
    ),
    a!gridTextColumn(
    label: "Worker ID",
    field: "Worker_ID",
    data: index(
    ri!DataSubset.data,
    "Worker_ID",
    null
    )
    ),
    a!gridTextColumn(
    label: "Divison",
    field: "New_HireDivison",
    data: index(
    ri!DataSubset.data,
    "New_HireDivison",
    null
    )
    ),
    a!gridTextColumn(
    label: "Cost Center",
    field: "New_CostCenter",
    data: index(
    ri!DataSubset.data,
    "New_CostCenter",
    null
    )
    ),
    a!gridTextColumn(
    label: "Worker Type",
    field: "Worker_Type",
    data: index(
    ri!DataSubset.data,
    "Worker_Type",
    null
    )
    ),
    a!gridTextColumn(
    label: "Services Requested",
    field: "Services_Requested",
    data: apply(
    substitute(
    _,
    ", Desk Phone",
    ""
    ),
    index(
    ri!DataSubset.data,
    "Services_Requested",
    {}
    )
    )
    ),
    a!gridTextColumn(
    label: "Date OB Form Submitted",
    field: "Date_OBFormSubmitted",
    data: index(
    ri!DataSubset.data,
    "Date_OBFormSubmitted",
    null
    )
    ),
    a!gridTextColumn(
    label: "Form Sumbitted ",
    field: "Form_Sumbitted",
    data: index(
    ri!DataSubset.data,
    "Form_Sumbitted",
    null
    )
    ),
    a!gridTextColumn(
    label: "Requestor",
    field: "Requestor",
    data: apply(
    rule!GetUserFullName,
    index(
    ri!DataSubset.data,
    "Requestor",
    {}
    )
    )
    ),
    a!gridTextColumn(
    label: "Reporting Manager",
    field: "Reporting_Manager",
    data: apply(
    rule!GetUserFullName,
    index(
    ri!DataSubset.data,
    "Reporting_Manager",
    {}
    )
    )
    ),
    a!gridTextColumn(
    label: "Location",
    field: "Location",
    data: index(
    ri!DataSubset.data,
    "Location",
    null
    )
    ),
    a!gridTextColumn(
    label: "Status",
    field: "Status",
    data: index(
    ri!DataSubset.data,
    "Status",
    null
    )
    )
    },
    value: ri!PagingInfo,
    saveInto: ri!PagingInfo
    )
    }
    )