calculated field are missing in the detail view

A place for users and developers of the Xataface to discuss and receive support.

Postby 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
avicet
 
Posts: 7
Joined: Wed Dec 31, 1969 5:00 pm

Postby 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
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby avicet » Tue Jul 10, 2007 7:01 pm

Fine, thank you !
avicet
 
Posts: 7
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 31 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved