I would like to have values from 3 fields displayed together in an additional field. Is this possible? The first field is a selection list (21, 22, 23, etc.) the second field is also a selection list (01, 02, 03, etc.) and the third field is an integer field with a three-digit number entry, e.g. 817. In the fourth field, selected or specified values should then be displayed together. For example like this: 2101817 So the 3 values should be shown together. Not added up.
Show values from 3 fields in a further field summarized
Collapse
X
-
You need a formula like this:
field4 = string\concatenate(field1, field2, field3)
more info here -> https://docs.espocrm.com/administrat...ingconcatenate -
Besides formula, it's possible to create a calculated fields manually using complex expressions to define an SQL expression that will be used when the field is selected.
Note that the field should be notStorable and readOnly.
In metadata > your entityType > entityDefs
Code:{ "fields": { "yourField": { "type": "varchar", "readOnly": true, "notStorable": true, "select": { "select": "CONCAT:( ... )" // here define your expression to concat fields } } }
If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.Comment
-
Is it possible to use complex expressions to retrieve attributes from other entities, or just from the entity being defined ?
Eg. build SQL expressions like: SELECT a.atttribute3 FROM "a" LEFT JOIN "b" ON a.attribute1 = b.attribute2 etc...Last edited by telecastg; 06-08-2021, 09:21 PM.
-
-
Great thank you. Worked wonderfully.
You need a formula like this:
field4 = string\concatenate(field1, field2, field3)
more info here -> https://docs.espocrm.com/administrat...ingconcatenateComment
Comment