← Back to team overview

dhis2-users team mailing list archive

Re: Screen error

 

Hi Marco,

Tracker capture works a bit differently... below are few steps that you
need to follow

1. use custom form

2. access the custom form
    var dataEntryForm = document.querySelector('d2-custom-form');
    var $scope = angular.element(dataEntryForm).scope();

3. now within the custom form, you can access all your input fields value
through using the data elements uid (UID)

var val = $scope.currentEvent['UID']

... you can the proceed with calculating your indicators...


---
Thank you,
Abyot.

On Wed, Apr 29, 2015 at 4:53 PM, Marko David Garcia <markodavidgm@xxxxxxxxx>
wrote:

> Hello Tran .
>
> We are basically trying to make some simple calculations in a multiple
> events with registration form .
>
> Initially we tried to make these calculations with indicators, but when
> try to include these on a stage with sections , these can't be added
> because only data elements appear .
>
> So we decided to perform calculations using javascript and forms with
> design, but the dataelements with date type appear in yellow and don't save
> the information .
>
> To workaround this issue we used the tracker capture, the date
> dataelements works fine, but the tracker doesn't perform the javascript
> calculations.
>
> Could you suggest any option to solve this problem.
>
> Thank you.
>
> Cordialmente,
>
>
> *Mag. (c). Marko David Garcia M.*
> *Ingeniería Telemática*
> *Universidad del Cauca*
> *Skype: marko_david*
>
> 2015-04-27 0:49 GMT-05:00 Tran Chau (HISP Vietnam) <
> tran.hispvietnam@xxxxxxxxx>:
>
> Hi Marko,
>>
>> The internet is too slow to connect to websites of foreign country
>> because the internet cable is broken again.
>> I tried to test this bug, but it works fine in my local site.
>> I cannot connect the demo to do an example for testing because of
>> internet.
>>
>> Could you create an example about this bug on demo server ?
>> We will see what is wrong as soon as I can connect the DHIS demo server.
>>
>> .............
>> Best regards,
>> Tran Chau
>>
>> On Thu, Apr 23, 2015 at 8:55 PM, Abyot Gizaw <abyota@xxxxxxxxx> wrote:
>>
>>> Hi Tran,
>>>
>>> Marko has already explained this in the list, he can also give you more
>>> details.
>>>
>>> so the bug he is getting is on Individual records module, on 2.18 and
>>> this happens when he is entering value for date type data elements... the
>>> error log he attached refers to commons.js
>>>
>>>
>>> ---
>>> Thank you,
>>> Abyot.
>>>
>>> On Thu, Apr 23, 2015 at 3:51 PM, Tran Chau (HISP Vietnam) <
>>> tran.hispvietnam@xxxxxxxxx> wrote:
>>>
>>>> Hi Abyot,
>>>>
>>>> Can you give me more information about which function, when this bug
>>>> occurs and which version for testing this bug ?
>>>>
>>>> .........................................
>>>> Best regards,
>>>> Tran Chau
>>>>
>>>> On Thu, Apr 23, 2015 at 8:49 PM, Abyot Gizaw <abyota@xxxxxxxxx> wrote:
>>>>
>>>>> Hi Tran,
>>>>>
>>>>> Do you have time to look into this?
>>>>>
>>>>> ---
>>>>> Thank you,
>>>>> Abyot.
>>>>>
>>>>> On Thu, Apr 23, 2015 at 3:40 PM, Marko David Garcia <
>>>>> markodavidgm@xxxxxxxxx> wrote:
>>>>>
>>>>>> Hi Abyot, this is the console error screen.
>>>>>>
>>>>>>
>>>>>> Best regards,
>>>>>>
>>>>>>
>>>>>> *Mag. (c). Marko David Garcia M.*
>>>>>> *Ingeniería Telemática*
>>>>>> *Universidad del Cauca*
>>>>>> *Skype: marko_david*
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>