← Back to team overview

dhis2-devs team mailing list archive

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

 

Lars/Markus,

Thanks for the clarification - I had interpreted the valueType as
controlling the optionvalue NAME and not the CODE. And the difference with
pre-2.25 versions were confusing.

My only concern then is the demand for uniqueness across option sets - from
the 2.26 User Manual:

"Option sets must have a code as well as a name. You can change the names
but you can't change the codes. Both names and codes of all options must be
unique, even across different option sets."

This means that you cannot have more than one optionSet using valueType
number and then using any number already used by another option set - or in
other words, you cannot have one numeric option set with options 1,2,3 and
another numeric option set with options 1,2,3,4,5

I've had no problems creating different TEXT option sets with identical
values, though: For instance, I've got one option set with "Yes, No,
Unknown" and another with "Yes, No, Unknown, Not applicable". They work
fine...

Regards
Calle

On 11 February 2017 at 15:27, Markus Bekken <markus@xxxxxxxxx> wrote:

> Hi Calle - the data type of the option set is meant to dictate what type
> of data the option set codes will be. I would say the error was in 2.24 and
> older dhis versions - allowing letters in codes for numeric option sets
> seems like a bug.
>
> Markus
>
> Den 11. feb. 2017 kl. 12.40 skrev Calle Hedberg <calle.hedberg@xxxxxxxxx>:
>
> 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
>
>


-- 

*******************************************

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedberg@xxxxxxxxx

Skype: calle_hedberg

*******************************************

References