The Question has been closed for reason: not a real questionby
On exporting selection field , system gives the value stored in database. how to get label for the corresponding value ? I have checked , selection options are no where stored in database. How selection key, values are computed and displayed on form and tree view.
Selection field is defined in .py files.. the selection itself is a list of tuples (or a tuple of tuples) where each tuple contains a
stored value - string to show pair.. like:
selection = [( 'val1', 'Text Value'), ('val2', 'VALUE 2')] ->
here val1 and val2 will be stored in database,
and Text Value, VALUE 2 will be visible in selection widget.. so when exporting you do not need to know these values ( they can vary depending on translation and lanugage you use) .. it is ok to export/import only val1 and val2....
If you want to know all vals stored in db for field , enable administrator interface, and hoower over the field... now you will have a full list of options, shown as pairs ( stored value - shwon value )
hope it helps..
About This Community
|Asked: 1/13/15, 1:59 PM|
|Seen: 1042 times|
|Last updated: 3/16/15, 8:10 AM|