Extrafield - I want CODE instead of ROWID

Hello,

I have an ODT template, and when I generate it, the extra field with ‘Select from table’ is pulling the rowid instead of the code. I want to get the code instead of the rowid

and whatever i do when i generate the odt it will take the rowid instead of the code.

Any advice will be appreciated

This hack might work, but I don’t know because I have never done anything like it.

a) you create a field that gets the rowid, and you hide this field
b) you create another field that uses the value from the “field that gets the rowid” and returns the ref (I suppose that is what you mean with CODE)

The code is the last column from my table in the database - see picture no.2
What is strange that in dolibarr filter or selection it shows correct but in the odt template it takes the rowid information

okay, I see. Which Dolibarr version do you run? If it is not the latest I would recommend trying with that version, and if it is the latest, then I think you need to file a bug report at github

I think that the latest version is 20.0.4

V20.0.3 i see that new one has appeard

The answer was xxx_name:code:code (tabel:label:id) - the answer was right in my eyes :slight_smile: