CMDBuild Forum

Auto Value Property

Is there any information on how to use the Auto Value Property that is found in Class > Attributes > Other Properties?

I would like to auto generate a value for the Code attribute in my class.

Have you found anything?

See the CMDBuild Administrator Manual 3.1 ENG paragraph 6.2.3:
Auto value: you can set the field value in the data Management Module according to other attributes of the form (through javascript code) CMDBuild

1 Like

First of all, sorry for my bad english.
if you have a class called “CLASS1” with one attribute colled “Attribute1” you can assign auto assign value by the following javascript

document.getElementsByName(“Attribute1”)[0].value = “some value”

By.

1 Like

Hi Curcar,

do you tested your example for Auto Value that is in Class > Attributes > Other Properties ?
Can you send me your configuration for java script ?
What are values [0] and some value in your script - document.getElementsByName(“Attribute1”)[0].value = “some value”?

And do you tested the field View rules and Validation rules ?
Can you send me your configuration for java script too?

Thank you.

1 Like

So does anyone have an actual answer for this? There is a grand total of 6 mentions over all the internet scrapped by google for “auto value” and cmdbuild.

The description in the manual is useless and this thread doesn’t contain an actual exemple.

Say I want a property of my card to be the concatenation of a property of the current card and the id of another card. What kind of javascript should I write? What’s the javascript API available?

Hi tecnoteca team, can you attach some example for javascript code.

For any one interested in this matter take a look at the topic “Calculate total number of X”

1 Like