calculated field are missing in the detail view

Archived from the Xataface Users forum.

avicet — Mon Jul 09, 2007 7:20 pm

hello,

I’ve added at top of fields.ini a query like this
__sql__ = “select …..”

the new fields are visible on the list but are missing on the detail view.

is there a solution to have the calculated fields both in the list and the detail view ?

Note: version in use is 0.7.1

Thank you for your help

alain


shannah — Mon Jul 09, 2007 11:50 pm

Thanks for pointing this out.
To fix this, you need to make a small mod to the Dataface/RecordView.php file. Near the top of the file, you’ll see something like:

Code: Select all
`function Dataface_RecordView(&$record){

      $this->record =& $record;
      $app =& Dataface_Application::getInstance();
      $fields = $this->record->_table->fields();`

We are interested in the line:

Code: Select all
$fields = $this->record->_table->fields();

Change it to:

Code: Select all
$fields = $this->record->_table->fields(false,true);

That will allow the fields to show up in details view.
This has been fixed in my dev version and will be included in the next release.

-Steve


avicet — Tue Jul 10, 2007 7:01 pm

Fine, thank you !