Re: [Dhis2-devs] Generating sequential numbers in program rule

2018-11-01 Thread Terence Scott
Dear Zubair Thank you for this recommendation. I have created the JIRA issue as suggested: DHIS2-5094 Kind regards, Terence Terence Scott Global Alliance for Rabies Control (GARC) Pan-African Rabies Control Network (PARACON) Steering Committee

Re: [Dhis2-devs] Generating sequential numbers in program rule

2018-11-01 Thread Zubair Asghar Raja
Hi Terence, Create a JIRA issue for this enhancement (ENROLLMENT_DATE) and we will look into it. Den tor. 1. nov. 2018, 9:21 a.m. skrev Terence Scott < terence.sc...@rabiesalliance.org: > Dear Shurajit > > Thanks for the advice. This worked fantastically - however, the > documentation is a

Re: [Dhis2-devs] Generating sequential numbers in program rule

2018-11-01 Thread Terence Scott
Dear Shurajit Thanks for the advice. This worked fantastically - however, the documentation is a little confusing with regards to the required format. Is there somewhere where I can possibly make suggestions for clarification? The string that eventually worked under the Auto-generate section is

Re: [Dhis2-devs] Generating sequential numbers in program rule

2018-10-31 Thread Shurajit Dutta
Hi Terence This textpattern applies to generating unique tracked entity attributes. So if you make the attribute unique and then system generated you can enter the pattern accordingly: [image: image.png] On Wed, Oct 31, 2018 at 5:58 PM Terence Scott < terence.sc...@rabiesalliance.org> wrote: >

Re: [Dhis2-devs] Generating sequential numbers in program rule

2018-10-31 Thread Terence Scott
Hi MSP Thank you for the suggestion. I have also attempted this and was unable to have any success. I tried to create a new rule with simply having "Sequential(###)" alone, and did not have any success either. Therefore, I assumed that there would be some sort of additional text that is required

Re: [Dhis2-devs] Generating sequential numbers in program rule

2018-10-30 Thread M.Selvaraaj Prabu
Hi Terrance, Sometime back I read about this. I think you need to use the expression like - ORG_UNIT_CODE(…) + "-" + CURRENT_DATE(ww) + "-" + SEQUENTIAL(#) Instead of using the function concatenate. Please refer the below link for more details: -

Re: [Dhis2-devs] Generating sequential numbers in program rule

2018-10-30 Thread Terence Scott
Dear Zubair, Nick I have upgraded the instance to 2.30 now and am attempting to once again implement the sequential numbering using the TextPattern option. I am using it on a TEAttribute, but have not had any success. Thus far, my Defined program rule action looks as follows: d2:concatenate(

Re: [Dhis2-devs] Generating sequential numbers in program rule

2018-10-10 Thread Zubair Asghar Raja
Hi Terence, There could be many reasons for that. Have you tried implementing what Nick suggested? The only limitation is that the TextPattern option is only available for TEAttribute and not to DataElement. Zubair Asghar DHIS-2 Developer University of Oslo zub...@dhis2.org

Re: [Dhis2-devs] Generating sequential numbers in program rule

2018-10-10 Thread Terence Scott
Hi Zubair Unfortunately, I am running 2.28 at the moment and therefore cannot do what Nick suggested. I will have to look into upgrading in any case, so I think that may be the best option for now. Thank you again for both of your help - I really appreciate it! Kind regards, Terence Terence

Re: [Dhis2-devs] Generating sequential numbers in program rule

2018-10-10 Thread Terence Scott
Dear Zubair Thank you for your rapid response. I have attempted to do this without success. I think I am misunderstanding. 1) I created the program variable "auto-increment' as suggested 2) In this step - is this a new program rule? I created a program rule as follows: "d2:hasValue #UID", Assign

Re: [Dhis2-devs] Generating sequential numbers in program rule

2018-10-10 Thread Zubair Asghar Raja
Hi Terence, Should be possible using CALCULATED_VALUE. Program rule variable having source type as CALCULATED_VALUE will get its value assigned by some other program rule. Try these steps 1. create program rule variable of source type CALCULATED_VALUE // Let say "auto-increment" 2. create program