Skip to main content
bhushanc391326
January 27, 2021
Question

Create a record for non primary key based table

  • January 27, 2021
  • 11 replies
  • 0 views

I have a table X which does not have a primary key. the format of data is something like this,

Indentifier for Request Emails [non Unique] Column A
ABC123 useremail@email.com A
ABC123 useremail@email.com V
XYZ582 User2@email.com D

I have to create a record to view this data.


Notes:

  • there is no primary key to this table.
  • Indentifier column is currently marked as primary key in table.
  • this table is not handled by Appian and is only referenced for data.
  • the table has more than 800 thousand rows at one time on average. the custom plugin breaks if user tries to export all data at once. [Business req. on export from Appian]

The record list breaks with following error: Expression evaluation error at function a!gridField [line 27]: A grid component [label=“”] has an invalid value for “totalCount”. “totalCount” must not be null or less than the number of items in any of the “data” arrays, but “totalCount” was XX and the largest column data array had XXXXX items.

Why record: I would like to leverage the filters and export functionality from records for this table. I know this can be achieved using query entity and export to excel plugin however I would like to know If this can be achieved in records which has all these functionalities inbuilt.

11 replies

pedro.simoes
January 27, 2021

Hi [mention:5ee4c401835c47eeb39abd471c636860:e9ed411860ed4f2ba0265705b8793d05],

What is preventing you from generating a standard primary key field that you just use internally and do not expose to the end user? The primary key needs to be a unique identifier of a record. If your example is real, you are not using a field that is unique since the first 2 rows have the same identifier. 

bhushanc391326
January 27, 2021

Hi [mention:56776deb2a52415789d7fb7482ab09b4:e9ed411860ed4f2ba0265705b8793d05]

The table is not managed within Appian and is not part of Appian db, it is part of different software suite. hence I cannot add a primary key. the table resides in shared database space. changes to the table is not permitted as it will break other software that is utilizing it.
the requirement is just to display the data in grid with export functionality from the table.

peter.lewis
Employee
January 27, 2021

To add to Pedro's answer - part of the reason a record requires a primary key is for export. To export data from a grid, the export will generate the data in batches to add to the grid, and the batching process needs to ensure that the data isn't duplicated in the export file.

Is it possible to create a database view that would add a column that uses a row count or calculated column as a unique field?