Dynamic attributes

Hi,
I’m using Cuba Platform 7.2 and I try to use Dynamic Attribute for filter and edit form.
I read documentation in Managing Dynamic Attributes - CUBA Platform. Developer’s Manual
but I have problem with setting.

I try to specify what I doing:
In my project I have an entity “cars” with one attribute “brand”.
I create, in dynamic attribute, an category “cars” and an attribute on field “brand” as enum.
I want to use this attribute in filter and in edit form but i don’t be able to do it.
My db is hsql, if I use sql db I have an jpql error on filter.
Is there an example to view how to set and use dynamic attribute?
Somebody can help me.

Hello!

Have you configured visibility settings? By default, the dynamic attribute is not shown.

Hi Mariya,
Thanks for response.
I entered visibility for the screen but now in the edit form I have two fields.
A normal input textfield and another field with dynamic attribute selection.
Why do I have two fields?

Also, if I use an SQL server database, the filter doesn’t work and I have jpgl error.
Is it possible that the dynamic filter does not work with the SQL server?

Hello,

Can you send me an error message?

Hi Mariya,

This’ s the error if I use sql server database:

JPQLException:
Exception Description: Problem compiling [select e from prova_Pdc e, sys$CategoryAttributeValue cav29355 where cav29355.entity.stringEntityId = e.id and lower ( cav29355.stringValue) like :filter_xUMFuAJETo05110 ESCAPE ‘’ and cav29355.categoryAttribute.id = ‘b7a0f1d5-a422-69db-7c5e-99112dab5082’].
[27, 53] The abstract schema type ‘sys$CategoryAttributeValue’ is unknown.
[69, 99] The state field path ‘cav29355.entity.stringEntityId’ cannot be resolved to a valid type.
[102, 106] The state field path ‘e.id’ cannot be resolved to a valid type.
[117, 137] The state field path ‘cav29355.stringValue’ cannot be resolved to a valid type.
[183, 212] The state field path ‘cav29355.categoryAttribute.id’ cannot be resolved to a valid type.

If I use Hsql database I hanv’t problem.

Instead, for the second problem, in the edit form I see two field, one normal and uno with dynamic attribute.
I attach two print sceen.
One with the edit form and one with the sql error.
errore foto attributi dinamici
Thank you for your help

Hello,

Please provide the Pdc entity source code.
Is the Pdc entity located in the main data store or an additional one?