Navigation:  Operational Maintenance > Solving Issues > End User Interface >

Error message when ordering column in view

Previous pageReturn to chapter overviewNext page
Show/Hide Hidden Text

When a user clicks on the header of a view column, the application crashes and shows "A General Error" or an error similar to below:

ORA-00904: "ID": invalid identifier 

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

 

Exception Details: Oracle.DataAccess.Client.OracleException: ORA-00904: "ID": invalid identifier

 

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

 

Stack Trace: 

 

[OracleException (0x80004005): ORA-00904: "ID": invalid identifier]

 

Cause

The issue is caused by a generated sort statement that is using incorrect captions. When a user clicks on the header, the application executes the view query again, but now automatically adds "ORDERED BY " and then the name of column behind it. In cause the column is defined without Alias, the addition of this ordered by part is using a wrong column name.

Solution

Define aliases for all columns that are displayed in the view. For example:

SELECT "ProcessInstance"."Id" as ProcessId, "ProcessInstance"."UniqueReference", 

"ProcessInstance"."DateStarted" as ProcessDateStarted, "ProcessInstanceLanguage"."Title" as ProcessName, 

"ProcessInstanceStepInstance"."DateStarted" as ProcessStepDateStarted, "ProcessInstanceStep"."Name" as ProcessStepName....

 

In this case the columns are identified by aliases and ordering will also be done using these exact alias names.