Skip to main content
Known Participant
May 30, 2023 12:14 PM UTC
Solved

Error while using Export Data Store Entity To Excel : Either selection or filters are invalid: The field [XYZ] does not exist. (APNX-1-4505-009)

I am using Export Data Store Entity To Excel smart service to export the data from a table to excel file.

When I export everything from the table it works well, however when I use Selection

= a!querySelection(
  columns: {
    a!queryColumn(
      field: pv!exportData.TechSpec,
      alias: "Tech_Spec"
    ),
    a!queryColumn(
      field: pv!exportData.Preservation_Demand,
      alias: "Preservation_Demand"
    )
  }
)

I get this error below :

Please help me with it.

    sanchitg0002
    Inspiring
    May 30, 2023 12:36 PM UTC

    Well, the error message is pretty clear. The value you are passing in field is not a valid fieldName but is some value stored in pv!. Check the CDT and pass the valid field name in string.

    3 replies

    sanchitg0002
    Inspiring
    May 30, 2023 12:36 PM UTC

    Well, the error message is pretty clear. The value you are passing in field is not a valid fieldName but is some value stored in pv!. Check the CDT and pass the valid field name in string.

    Known Participant
    May 30, 2023 12:46 PM UTC

    Worked,Thanks!

    harshitb6843
    Brainy
    May 30, 2023 1:44 PM UTC

    Also, I would advice to isolate the a!querySelection in a separate expression rule so you don't update the PM everytime you want to make changes in it.