Lookup table - Displays rendered value (v2020)

Hello!

“Display field” of phpmaker v2020 (comparing to v12) displays “Row rendered value” instead of “CurrentValue” of a field.

Assume I have a table “order” and table “order_history” which has field “order_id”.

Field “order_history.order_id” settings:

  1. Edit Tag → as “Text” and [Use lookup table] is checked
  2. Lookup Table → (Table name: " order ", Link field: "order_id “, Display field #1: " order_id”, Display field #2: “firstname”)

Table “order” has additional data for field “order_id” in Row Rendered event:

$this->order_id->ViewValue = " “.$this->order_id->CurrentValue.”
Do something
";

When I add data to “order_history” table (order_historyadd.php) in field “order_id” I see:

“323
Do something
, John”

instead of (so as it was in v12):

“323, John”

Why it takes rendered value and is it possible to Display “CurrentValue” of a field “order_history.order_id” instead of “Row rendered value”?

Just add this condition in “Row_Rendered” server event:

if (CurrentPageID() != “add”) {

$this->order_id->ViewValue = " “.$this->order_id->CurrentValue.”
Do something
";

}

Yeah, thanx!

I had the same issue, and the solution offered here is only a partial fix.
If you have the same field in your extended search, the search drop-down also includes the rendered values instead of the original values.
I worked around it by creating a custom view and performing the lookup on that instead