← Back to team overview

dhis2-devs team mailing list archive

Re: Option Set uniqueness constraint appears to be universal rather than restrict to a specific option set for v2.3

 

David,

What is supported and not supported from version to version is anybody's
guess, sometimes. And the error message you are displaying does not make
sense, in any case...

In terms of option sets and option values, I frequently re-use option value
NAMES (no problem with that, at least up to version 2.29), but i prefer to
use unique option value CODES. Ref this small example below - sometimes I
prefix the optionvalue code with the full optionset code, sometimes (like
here) I use an abbreviated version. The key point is that this approach
ensures that all optionvalue codes stored in the relevant datavalue table
don't get "mixed up", which - for instance - makes it easier to review
value frequencies to pick up redundant values etc (common for a database
under development, where administrators/developers might make meta-data
changes without ensuring that all existing values are updated AND all
users' browser cache refreshed - I have had cases where some users kept on
using and outdated browser cache and thus submitted outdated option values
for six month!)

I also do not like copying the name into the code, by the way - why have a
code field at all if you do that...

My 2c worth
Regards
Calle

*Query26*
set setcode optvalue valuecode
YesNoNA YESNONA Yes YNNA_YES
YesNoNA YESNONA Not Applicable YNNA_NA
YesNoNA YESNONA No YNNA_NO
YesNoUnknown YESNOUNK No YNUNK_NO
YesNoUnknown YESNOUNK Yes YNUNK_YES
YesNoUnknown YESNOUNK Unknown YNUNK_UNK



On Mon, 27 Aug 2018 at 10:36, David Hagan <david.hagan@xxxxxxxxxxxxx> wrote:

> bump
> --------------------------
> David Hagan
> SageHagan GmbH, eSHIfT Partner Network
> Mob: +41 79 848 5359
> Skype: david.j.hagan
>
>
> On Thu, 23 Aug 2018 at 08:34, David Hagan <david.hagan@xxxxxxxxxxxxx>
> wrote:
>
>> Morning all,
>>
>> It's been a while since I've communicated with the list... but am in the
>> middle of building interfaces from lab equipment into DHIS2... and came
>> across an apparent minor bug (unless I am reading this wrong)...
>>
>> In this use case... the result option 'indeterminate' needs to be used in
>> a number of different option sets. According to the 'warning' message
>> below, options (of course) need to be unique within a given option set...
>> but as can be seen, when I go to add this as an option to this small option
>> set, the fact that it has already been defined and used as an option
>> elsewhere appears to be stopping it from being added.
>>
>> Any thoughts?
>>
>> I'm on
>>
>> Version: 2.30Build revision: 1a314a5Build date: 2018-08-14 06:07
>>
>> [image: image.png]
>>
>> All the best,
>>
>> David Hagan
>>
>>
>> --------------------------
>> David Hagan
>> SageHagan GmbH, eSHIfT Partner Network
>> Mob: +41 79 848 5359
>> Skype: david.j.hagan
>>
> _______________________________________________
> 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

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

PNG image


References