User attempts to sort by the entity name field and does not behave as expected

I have a Tempo Task report that is showing tasks for a certain process. The Task Report has a column called Entity that corresponds to a Entity ID that is contained in a pv in the process. I am using a separate query to pull all of the relevant Entity CDTs and then using the displayvalue() function to display the Entity Name in the report instead of the Entity ID. So far so good.

If a user attempts to sort by the Entity Name field it does not behave as the user expects. Since the column is actually backed by the Entity ID in the PortalReportDataSubset, the report sorts in order of Entity ID instead of alphabetically by Entity Name (the value that is being displayed to the user).

Has anyone encountered any good work arounds?

OriginalPostID-137632

OriginalPostID-137632

  Discussion posts and replies are publicly visible

Parents
  • Dan,

    A few things come to mind:

    1) If you have access to the text descriptions and a way to map them to your ID's without database interaction (maybe you control the updates to your entity table and you can cache this data in a constant), you could add a column to your portal task report that uses an expression to do the mapping there. I could see this causing some performance problems if your expression is too complicated or you have too many tasks.

    2) You could add a parallel text version of your process variable and use that in your portal task report. If you have long lived, already running process instances in production and its an important enough feature, you could look at a combination of process upgrade and Set External PVs to get those instances updated with the correct text values.
Reply
  • Dan,

    A few things come to mind:

    1) If you have access to the text descriptions and a way to map them to your ID's without database interaction (maybe you control the updates to your entity table and you can cache this data in a constant), you could add a column to your portal task report that uses an expression to do the mapping there. I could see this causing some performance problems if your expression is too complicated or you have too many tasks.

    2) You could add a parallel text version of your process variable and use that in your portal task report. If you have long lived, already running process instances in production and its an important enough feature, you could look at a combination of process upgrade and Set External PVs to get those instances updated with the correct text values.
Children
No Data