CMDBuild Forum

CMDBuild 3 REFERENCE field Filter works differently now

I use Filters on REFERENCE fields to show only relevant information based on the field in use.

Previously I had this:

from ManufacturerModels where HWSWType="Maintenance/Warranty"

This generates errors indicating a conversion to INTEGER error so I have now had to change to use the Id field value thus:

from ManufacturerModels where HWSWType=49390


Is this change by design, or a fault?

Can you please make sure that the field in question is a REFERENCE and not a LOOKUP?
Also could you be more specific about the context in which you are using the filter?
 
Thanks
CMDBuild Team
 
Previously Chris wrote:

I use Filters on REFERENCE fields to show only relevant information based on the field in use.

Previously I had this:

from ManufacturerModels where HWSWType="Maintenance/Warranty"

This generates errors indicating a conversion to INTEGER error so I have now had to change to use the Id field value thus:

from ManufacturerModels where HWSWType=49390


Is this change by design, or a fault?

 

Previously Tecnoteca wrote:

Can you please make sure that the field in question is a REFERENCE and not a LOOKUP?
Also could you be more specific about the context in which you are using the filter?
 
Thanks
CMDBuild Team
 
Previously Chris wrote:

I use Filters on REFERENCE fields to show only relevant information based on the field in use.

Previously I had this:

from ManufacturerModels where HWSWType="Maintenance/Warranty"

This generates errors indicating a conversion to INTEGER error so I have now had to change to use the Id field value thus:

from ManufacturerModels where HWSWType=49390


Is this change by design, or a fault?

 

Yes, it's definitely a REFERENCE field.
 
The context above is that the field in question is filtering a Models table to only show Maintenance types.
 
Another example, I have a form to record Hard Disks. On this form, there is a Model field which looks up entries from the same Models table use above, but filtered to Hard Disk types.
 
The Models table covers all types of hardware, Disks, Computers, Laptops, Phones etc, so is filtered where appropriate on each form to only show relevant data.
My filter filters this lookup to only show Hard Disks.
 
 

Previously Chris wrote:

Previously Tecnoteca wrote:
Can you please make sure that the field in question is a REFERENCE and not a LOOKUP?
Also could you be more specific about the context in which you are using the filter?
 
Thanks
CMDBuild Team
 
Previously Chris wrote:

I use Filters on REFERENCE fields to show only relevant information based on the field in use.

Previously I had this:

from ManufacturerModels where HWSWType="Maintenance/Warranty"

This generates errors indicating a conversion to INTEGER error so I have now had to change to use the Id field value thus:

from ManufacturerModels where HWSWType=49390


Is this change by design, or a fault?

 

Yes, it's definitely a REFERENCE field.
 
The context above is that the field in question is filtering a Models table to only show Maintenance types.
 
Another example, I have a form to record Hard Disks. On this form, there is a Model field which looks up entries from the same Models table use above, but filtered to Hard Disk types.
 
The Models table covers all types of hardware, Disks, Computers, Laptops, Phones etc, so is filtered where appropriate on each form to only show relevant data.
My filter filters this lookup to only show Hard Disks.
 
 
I tried to replicate the issue you are encountering on CMDBuild version 2.5.1 and even there the filter requires the usage of the Id field (that is an integer). Are you using a version even older than 2.5.1?
Anyhow our suggestion is to use the Id field from now on.
 
CMDBuild Team