.periodOffset(-1) does not work

Hi, Community
I have created an aggregated form with a monthly period in order to record information on the stock level of a medication. The form includes a field which displays the stock level of the products at the start of the month, which should match the stock level at the end of the previous month.

I would like this field to be automatically populated with the quantity of medication from the end of the previous month. To do this, I have created an indicator using the formula:
#{s4ojhJUjjo4}.periodOffset(-1).

However, when testing the monthly stock level form, the indicator is not displaying any information and remains empty. I am unable to determine the cause of this problem. Can anyone help me resolve this issue?

Thank you for your post @elmoujarrade!

It seems there might be issues related to this: [DHIS2-14038] - Jira

Investigating further if the issue is in the new app only or both apps. I also tried to use preiodOffset and replicate the same use case you described above but wasn’t able to make it work.

Thanks!

1 Like

Hi, @Gassim
Thank you for your quick response
I see that the affected version is Dhis2 2.39; and I have the version Dhis2 2.36.