Attribute value with SEQUENTIAL

Dear all,
I use SEQUENTIAL with 4digits for attribute value.
we use a while, it is working fine from android device. but now we got “There are no more reserved values. Contact your system administrator.” highlight around attribute value that use SEQUENTIAL. when i re-check the the value seem not yet use all number yet.
as technical, what should we do?

thanks
channara

@Channara thank you for your question! Please what is the version of the DHIS2 instance that you are using and what is the version of the android app? Could it possibly be related to this Jira issue: ANDROAPP-3271 - [Bug] Reserved values are being deleted when trying to get one in offline mode ?

Someone from @dhis2-android should be able to answer your question!

Hi @Gassim ,
DHIS2 instance is V2.35
DHIS2 android is V2.5

thanks
channara

1 Like

Hey @Channara,

Generally speaking, gaps in sequential values are possible; some android devices can reserve values, but not use them, but the sequential value counter in the database is increased. Is this issue happening consistently, or do you see it in offline mode, like in the Jira ticket Gassim shared above? If the issue is consistent and blocking all TEI syncs, one solution could be to increase the capacity of your SEQUENTIAL value attribute, for example, go from 4 digits to 5. Would that be possible in your case?

Gintare

1 Like

Hi @Channara,

the android app reserves 100 values per by default in the initial synchronization. These values are stored in the device and removed once they are used. From the server perspective, these values are reserved and cannot be assigned to any TEI, it does not matter if they are used or not. So, if the device does not use them, there will be gaps in the sequence.

As Gintare said, you can increase the the capacity of the sequence if the synchronization is blocked.

The reason to reserve 100 values is to minimize the risk of running out of values when offline, but this parameter can be customized. If you are sure that the uses won’t consume so many offline values (there are not so many registrations when the device is offline), you can decrease the number of reserved values. When the device is online, it will automatically refill them.

You can modify this value in two places:

  • Per device: in the left-side menu, go to Settings → Reserved Values and change the default value. This must be changed on every device.
  • Per server: you can change the default value for all the devices by using the Android Settings app → General → Reserved values downloaded per TEI attribute.

Hope it helps

2 Likes

Hi @Channara , please also read these:

I am not sure about your implementation but a SEQUENTIAL of 4 digits means 10000 values (from 0 to 9999) and this can be very low in most of the implementations. As per what was explained by @vgarciabnz (and linked in the docs) if you would have 100 devices this means that after the initial synchronization of your devices you would have exhausted all the values!

100 devices x 100 reserved values

So you probably want a higher value.

2 Likes

Over a year later and this one saved my bacon, thanks @jaime.bosque
At a training and we ran out of record IDs and I discovered the system was configured to assign a max of 999 IDs per record per facility per day. With 15 mobile devices each reserving 100 IDs, we had none available for data entry. I added a fourth digit to the number which resolved the issue.

2 Likes

A pleasure to be of help! :v:

1 Like