Solved

Error caused by display_expression

  • 16 May 2019
  • 2 replies
  • 94 views

Userlevel 1
Badge +2
One column of my table has the column id 'display_expression_1' and it is giving me an error (Invalid column name 'jaar') in the application when modifying a record.
The column description in the SF says: "Automatically created with the upgrade to G9.5. Replacement for look-up display expression."
There are other display expression columns in the same table which are not causing an error. The only difference between them is that the former column has no 'Expression dependencies' specified. See comparison of both columns below.



I expect that this lack of dependencies is causing the problem, but cannot find a way to add them.

Please advise how I can solve this issue.
Thanks!
icon

Best answer by Robbert van Tongeren 16 May 2019, 15:29

It seems to me that the expression in "display_expression_2" is not correct, it seems to be unable to find the column "jaar".
Also the expression in "display_expression_1" is empty, (This could also be the problem to the error, try adding a value here ('test' for example), or delete the column when its not needed anymore.)

If you want to debug the calculated field query in "display_expression_2" you can do something like:
select (
--Paste here the query from the calculated field query from the "display_expression_2"
) as display_expression_2
,t1.*
from [table] t1 --Where table is the table where the expression field is defined in the SF.

To answer you question, dependent is automatically filled by the SF when referencing a column in the table, with the t1. prefix. (t1. referencing to the "current table" in the expression field.)

Hope this helps.
View original

2 replies

Userlevel 3
It seems to me that the expression in "display_expression_2" is not correct, it seems to be unable to find the column "jaar".
Also the expression in "display_expression_1" is empty, (This could also be the problem to the error, try adding a value here ('test' for example), or delete the column when its not needed anymore.)

If you want to debug the calculated field query in "display_expression_2" you can do something like:
select (
--Paste here the query from the calculated field query from the "display_expression_2"
) as display_expression_2
,t1.*
from [table] t1 --Where table is the table where the expression field is defined in the SF.

To answer you question, dependent is automatically filled by the SF when referencing a column in the table, with the t1. prefix. (t1. referencing to the "current table" in the expression field.)

Hope this helps.
Userlevel 1
Badge +2
Thanks! Adding t1 to the calculated field query did the trick!

Reply