Cannot export datastore entity to Excel but can export datastore entity to Csv

Greetings,

I am having an issue with a!exportDataStoreEntityToExcel() but I do not have an issue with a!exportDataStoreEntityToCsv(). They use the same inputs.

I have uploaded a screenshot of the error message on the interface. I checked the tomcat-stdout log file and it says java.nullpointerexception. We are using a View on a PostgreSQL database.

I am not too positive but it might have stopped working after manually erasing some rows in the tables for the View.

We optimally want the Excel one working. Does somebody know what is wrong or have a similar issue?

a!buttonWidget(
        label: "Generate Export of SFNS Orders",
        tooltip: "Export Available for Product Creators",
        /* tooltip: if(local!productCreatorUserStatus = true, null, "Export Available for Product Creators"),*/
        saveInto: {
          a!exportDataStoreEntityToExcel(
            entity: cons!PMT_DSE_VIEW_SFNS_VIEW_ORDER_GRID,
            selection: {
              a!querySelection(
                columns: {
                  a!queryColumn("id", "OrderID"),
                  a!queryColumn("ordernumber", "OrderNumber"),
                  a!queryColumn("orderType", "Division"),
                  a!queryColumn("surveyTypes", "Product"),
                  a!queryColumn("workflowStage", "Phase"),
                  a!queryColumn("validationStatus", "ValidationStatus"),
                  a!queryColumn("status", "Status"),
                  a!queryColumn("needDate", "NeedDate"),
                  a!queryColumn("locationBase", "LocationBase"),
                  a!queryColumn("foundationDomain", "FoundationDomain"),
                  a!queryColumn("intendedUse", "IntendedUse"),
                  a!queryColumn("customerPriority", "CustomerPriority"),
                  a!queryColumn(
                    "strategicPriority",
                    "StrategicPriority"
                  ),
                  a!queryColumn("nsgMember", "NSGMember"),
                  a!queryColumn("subOrdId", "SubOrgID")
                }
              )
            },
            filters: a!queryLogicalExpression(
              operator: "AND",
              filters: {
                a!queryFilter(
                  field: "orderType",
                  operator: "in",
                  value: local!divisionFilter
                ),
                a!queryFilter(
                  field: "customerPriority",
                  operator: "in",
                  value: local!priorityFilter
                ),
                a!queryFilter(
                  field: "workflowStage",
                  operator: "in",
                  value: local!phaseFilter
                ),
                a!queryFilter(
                  field: "needDate",
                  operator: "between",
                  value: local!dateFilter
                ),
                a!queryFilter(
                  field: "status",
                  operator: "in",
                  value: local!statusFilter
                ),
                a!queryFilter(
                  field: "locationBase",
                  operator: "in",
                  value: touniformstring(local!baseFilter)
                ),
                a!queryFilter(
                  field: "validationStatus",
                  operator: "in",
                  value: local!validationStatusFilter
                )
              },
              ignoreFiltersWithEmptyValues: true
            ),
            documentName: "SFNS Data Excel Export " & now(),
            saveInFolder: cons!PMT_EXCEL_ORDER_EXPORT_FOLDER,
            onSuccess: a!save(local!exportDocId, fv!newDocument),
            onError: a!save(
              local!errorMessage,
              "Error Exporting File to Excel"
            )
          )
        },
        style: "NORMAL",
        disabled: not(isNull(local!exportDocId))
      )

  Discussion posts and replies are publicly visible

Parents
  • I'm assuming you are already doing fine with user security and permissions as exportDataStoreEntityToCsv() works just fine for you. If there would have been an issue with the view then DSE to csv also wouldn't have worked, so can you try to use some different entity like a different table instead of view in DSE to Excel service to troubleshoot if the error is with the service.

    Also, which version of Appian cloud instance you are using? and can you please share the trace log that you have extracted?

Reply
  • I'm assuming you are already doing fine with user security and permissions as exportDataStoreEntityToCsv() works just fine for you. If there would have been an issue with the view then DSE to csv also wouldn't have worked, so can you try to use some different entity like a different table instead of view in DSE to Excel service to troubleshoot if the error is with the service.

    Also, which version of Appian cloud instance you are using? and can you please share the trace log that you have extracted?

Children