Views 2 Intergration

mikeytown2 - December 7, 2008 - 01:58
Project:Computed Field
Version:6.x-1.0-beta2
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Any chance of using a computed field as a displayable field in views 2?

#1

kswan - December 16, 2008 - 19:29
Status:active» fixed

It works for me. I have the "Store using the database settings below" box checked in the Computed field and it works great with Views 2.

I haven't tried it without storing in the database.

#2

T-Shirt - December 19, 2008 - 06:53

Yes, this module works with Views 2 but I wonder why is the output is NULL? Another question is, the computed field value does not return any value in a node.

Thanks for any response.

#3

mikeytown2 - December 19, 2008 - 09:05

I try to stay away from storing it in the database, I have shared hosting and the database is very slow. So it looks like I need to put it in the database. Thanks for the info.

#4

kswan - December 19, 2008 - 13:39

I am considering another approach that might help http://groups.drupal.org/node/17466. As far as I know that approach is not yet available. I am considering writing a module that would allow custom field entries in Views.

There would be a few significant differences between this hypothetical module and the computed field module.

  • The custom field would only display on the view. It would not be on the node view.
  • The custom field would use SQL functions instead of PHP. PHP would not work.
  • The custom fields would not be abstracted to the database. For example "(TO_DAYS(NOW) - TO_DAYS(field_due_date)) AS days_late" would work in MySQL, but not Postgres.

I have not started working on this module so I don't know if it is actually possible. Please respond to my post on g.d.o if you are interested or have feature requests.

#5

mikeytown2 - December 30, 2008 - 06:33

I have over 100 nodes that need to be "updated" for the computed field database entry... any easy way to do this? Clicking edit and save on all of those nodes would suck; plus in the future if I need to update it again, it would be a nice thing to have.

#6

System Message - January 13, 2009 - 06:40
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

#7

glennnz - August 10, 2009 - 00:51

Bump

My computed field value won't show in my View. It's being stored in the database, I can see it there.

Thanks

Glenn

--UPDATE--

This is bizarre, I am using Ubercart and uc_node_checkout to create my node which has the computed CCK field./

Before checkout, the computed field is in the database. Aftyer checkout, it's gone. The checkout process is deleting it.

My computed filed code is:

$nid = $_GET[product_nid];
$title = db_result(db_query("SELECT title FROM {node} WHERE nid = %d", $nid));
$node_field[0]['value'] = $title;

Thanks

Glenn

#8

glennnz - August 10, 2009 - 20:33
Category:feature request» bug report
Priority:normal» critical
Status:closed» active

Updated status re my previous comment.

Glenn

#9

deekayen - August 21, 2009 - 06:47
Category:bug report» feature request
Priority:critical» normal

Views is a third party module, which makes supporting it a feature.

 
 

Drupal is a registered trademark of Dries Buytaert.