G'Day Views people,

My apologies in advance for not being quite sure where in the pipeline my problem is situated. Since I see it through Views, you're my starting point!

Using CCK, I've set up a UID field that identifies instances in a collection of content nodes. Simply: the client has a bunch of projects, each with a UID.

The UID is in the form of x.xx...and for various reasons, this is an important format to maintain.

So I have a CCK field that is storing these values: field_project_uid

The field is type = decimal, decimal marker = decimal, scale = 2

I created a View that should allow me to pass the UID as an argument value. But a show-stopper problem arises:

The view query rounds off my decimals.

Eg, for the UID argument = 1.03, I have this value statement formed by Views:
(node_data_field_project_uid.field_project_uid_value = 1)

Here's the entire query:

SELECT node.nid AS nid,
   node.title AS node_title
 FROM node node 
 INNER JOIN content_field_project_uid node_data_field_project_uid ON node.vid = node_data_field_project_uid.vid
 WHERE (node.type in ('book', 'project_portal')) AND (node_data_field_project_uid.field_project_uid_value = 1)
 

The View fundamnetally works since passing an "all" wildcard does return the content I'm looking for...but obviously the argument is malformed.

What to do next?

Thanks,

JB

Comments

yched’s picture

yched’s picture

Project: Views (for Drupal 7) » Content Construction Kit (CCK)
Version: 6.x-2.4 » 6.x-2.x-dev
Component: Views Data » Views Integration
Status: Closed (duplicate) » Active

back to active : the issue here is about decimal *arguments*, not filters (which are fixed)

yched’s picture

Title: Control over field format: error with decimal values » error with decimal values as views argument

Better title

yched’s picture

Category: support » feature

Actually for arguments on decimal fields we use views_handler_argument_numeric, which assumes integers. Views doesn't provide a views_handler_argument_float, whereas it does provide views_handler_filter_float.
I'll check with merlinofchaos whether this should be considered a Views issue, but meanwhile we'll have to provide our own.

pomliane’s picture

Hi !
Old subject... But, any news on it?

avpaderno’s picture

Status: Active » Closed (outdated)

I am closing this issue, as Drupal 6 is now not supported.