← Back to team overview

dhis2-devs team mailing list archive

Re: OptionSets of type Number - is optionvalue CODES then limited to number?

 

Hi Calle,

the value type of option sets do refer to the codes of the options within
the option set.

In the data entry apps, for data elements with option sets, we do store the
codes of the options (not the name) in the database. Also, the value type
of the data element is inherited from its option set. This ensures that the
data values stored for a data element matches the value type of the data
element (and its option set).

Lars





On Sat, Feb 11, 2017 at 12:40 PM, Calle Hedberg <calle.hedberg@xxxxxxxxx>
wrote:

> Hi again,
>
> Just to add: the constraint that optionSets with valueType = Number can
> only have optionValue codes consisting of digits is new in either 2.25
> and/or 2.26 - it is not there in 2.24.
>
> Which is why I suspect this might be a bug - but I would like confirmation
> before reporting it on JIRA
>
> Best regards
> Calle
>
> On 11 February 2017 at 13:21, Calle Hedberg <calle.hedberg@xxxxxxxxx>
> wrote:
>
>> Hi
>>
>> I am uncertain if this is a bug or not (latest build 2.26):
>> When you define an option set using valueType=Number, the system will
>> only accept optionValue codes consisting of digits (no letters) for that
>> optionSet.
>>
>> There is no mention of this restriction in the user manual.
>>
>> Is this intended behaviour, or is it a bug?
>>
>> Regards
>> Calle
>>
>> *******************************************
>>
>> Calle Hedberg
>>
>> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>>
>> Tel/fax (home): +27-21-685-6472 <+27%2021%20685%206472>
>>
>> Cell: +27-82-853-5352 <+27%2082%20853%205352>
>>
>> Iridium SatPhone: +8816-315-19119 <+881%206%20315%2019119>
>>
>> Email: calle.hedberg@xxxxxxxxx
>>
>> Skype: calle_hedberg
>>
>> *******************************************
>>
>>
>
>
> --
>
> *******************************************
>
> Calle Hedberg
>
> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>
> Tel/fax (home): +27-21-685-6472 <+27%2021%20685%206472>
>
> Cell: +27-82-853-5352 <+27%2082%20853%205352>
>
> Iridium SatPhone: +8816-315-19119 <+881%206%20315%2019119>
>
> Email: calle.hedberg@xxxxxxxxx
>
> Skype: calle_hedberg
>
> *******************************************
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
lars@xxxxxxxxx
http://www.dhis2.org <https://www.dhis2.org/>

References