Ok.
Just ran the build. I think the problem you're seeing is actually unrelated
to the random() call. Two things:
-
The validator only validates the code that's been approved and pushed
into JR core, which is why you're seeing the problem there. There's a patch
being reviewed currently which will include this code. -
We're currently updating the CC build on the build server, afterwards
this problem should be fixed. I'll let you know when it's online.
-Clayton
···
On Wed, Mar 23, 2011 at 12:23 PM, Drew Roos wrote:this xpath function should be included in the commcare build as of build
#7062 on 2/17On Wed, Mar 23, 2011 at 12:03 PM, Clayton Sims csims@dimagi.com wrote:
The problem is definitely whether your build includes the xpath function
(which it doesn't seem to).Drew: What's the first build # that should include the function?
-Clayton
On Wed, Mar 23, 2011 at 5:42 AM, Nick Amland namland@dimagi.com wrote:
Hey Drew,
When I said it worked, I meant that the application could be opened and
installed. I hadn't yet tested the actual form. I did that this morning,
and I receive and "Application Error" force close when I reach the end of
the form.After I received that I validated and tested in the xform validator
(those are great directions on bitbucket). I successfully "validated" the
xform. So, then I clicked "Test". The emulator successfully opened but
when I clicked "launch", there was an error in the GUI window and the
emulator just continued to load. I've pasted the GUI window contents in the
attached text file.Doesn't sound like you'll be too surprised by this because you mentioned
the form hadn't really been tested.However, after this happened, I took another xform that is currently "in
production" in our household module. I went through the same steps, and I
got an error and the emulator continued to load (this xform "dod_hh_reg" is
attached). I'm wondering what the problem here is when this xform has been
tested and is working in the field.FYI, I've tested other xform files from the household module that is
currently working in the field. So, it seems like the problem isn't with
the validator. I'm just trying to get more familiar with all of this.Thanks,
NickNick P. Amland
CommCare Field Fellow
Dimagi, Inc.
Dodoma, Tanzania
Google Voice: 253.642.7790
TZ Mobile: +255 762 740 996
Email: namland@dimagi.com namland08@gmail.comOn Wed, Mar 23, 2011 at 10:58 AM, Nick Amland namland@dimagi.comwrote:
Hey all,
I tried to download this morning - and it downloaded a 698kb file. I
put that JAR and the JAD on the phone, and it worked.That's weird that I tried downloading the JAR file 4 times and only once
was the file (that did successfully download completely) over 200kb.
Probably an internet connection thing, right?In the future, I'll be sure to check that, first.
Thanks,
NickNick P. Amland
CommCare Field Fellow
Dimagi, Inc.
Dodoma, Tanzania
Google Voice: 253.642.7790
TZ Mobile: +255 762 740 996
Email: namland@dimagi.com namland08@gmail.comOn Wed, Mar 23, 2011 at 12:12 AM, Nick Amland namland@dimagi.comwrote:
Hey,
I can't access CCHQ now. I tried downloading the JAR file again, and I
received a "500" error. Screenshot attached.I'll try again in 15 minutes.
thanks,
NickNick P. Amland
CommCare Field Fellow
Dimagi, Inc.
Dodoma, Tanzania
Google Voice: 253.642.7790
TZ Mobile: +255 762 740 996
Email: namland@dimagi.com namland08@gmail.comOn Wed, Mar 23, 2011 at 12:05 AM, Clayton Sims csims@dimagi.comwrote:
Nick,
Yeah, this download just didn't work. CommCare.jar should be closer to
700kb. Try to download it again?-Clayton
On Tue, Mar 22, 2011 at 4:50 PM, Nick Amland namland@dimagi.comwrote:
Sure, The JAR/JAD from this recent build in question are attached.
Nick P. Amland
CommCare Field Fellow
Dimagi, Inc.
Dodoma, Tanzania
Google Voice: 253.642.7790
TZ Mobile: +255 762 740 996
Email: namland@dimagi.com namland08@gmail.comOn Tue, Mar 22, 2011 at 11:44 PM, Jonathan Jackson < jjackson@dimagi.com> wrote:
Nick - just to triple check, can you e-mail the EXACT jad/jar
directly from your SD Card over e-mail.-J
On Tue, Mar 22, 2011 at 4:43 PM, Drew Roos droos@dimagi.comwrote:
what about formatting / trying a different SD card?
On Tue, Mar 22, 2011 at 4:42 PM, Clayton Sims csims@dimagi.comwrote:
Hmmm, can you see if there's a firmware update available for your
phone through the Nokia PC suite?-Clayton
On Tue, Mar 22, 2011 at 4:40 PM, Nick Amland namland@dimagi.comwrote:
No, this is my first time. I haven't downloaded builds from
either 0.9 or 1.0 HQ's.Nick
Nick P. Amland
CommCare Field Fellow
Dimagi, Inc.
Dodoma, Tanzania
Google Voice: 253.642.7790
TZ Mobile: +255 762 740 996
Email: namland@dimagi.com namland08@gmail.comOn Tue, Mar 22, 2011 at 11:38 PM, Clayton Sims <csims@dimagi.com wrote:
It seems pretty unlikely on a 2700c, but it's technically
possible. Nick, have you installed apps from www.cchq before?-Clayton
On Tue, Mar 22, 2011 at 4:36 PM, Drew Roos droos@dimagi.comwrote:
is this an issue of the phone not having the right root certs?
On Tue, Mar 22, 2011 at 4:30 PM, Nick Amland < namland@dimagi.com> wrote:
Hey clayton,
I just repeated these steps:
- Download JAR and JAD from here:
https://www.commcarehq.org/a/namland/apps/view/051ef446971a2d6e3ad0f99c5f56a8bb/?m=&f=- Then, I deleted the current JAR and JAD on the SD card
(files in root folder)- I copy and pasted the new JAR and JAD on the SD card
(files in root folder)- Put the SD card in the phone and accessed SD card
- The application is still found to be invalid.
- Date was correct
- This phone is currently running the CommCare newborn
moduleThink it's a problem with the phone?
Thanks,
NickNick P. Amland
CommCare Field Fellow
Dimagi, Inc.
Dodoma, Tanzania
Google Voice: 253.642.7790
TZ Mobile: +255 762 740 996
Email: namland@dimagi.com namland08@gmail.comOn Tue, Mar 22, 2011 at 11:15 PM, Nick Amland < namland@dimagi.com> wrote:
Weird. I'm using the 2700c also. I downloaded the JAR and
JAD from the release manager page (the one I linked you to). Then, replaced
the existing JAR and JAD with these new ones.How did you transfer the app over?
Let me try again just to verify.
Thanks,
NickNick P. Amland
CommCare Field Fellow
Dimagi, Inc.
Dodoma, Tanzania
Google Voice: 253.642.7790
TZ Mobile: +255 762 740 996
Email: namland@dimagi.com namland08@gmail.comOn Tue, Mar 22, 2011 at 9:11 PM, Clayton Sims < csims@dimagi.com> wrote:
Hm, I just ran on our 2700c and it worked fine. Maybe the
download didn't work on the phone? How'd you transfer the app over?-Clayton
On Tue, Mar 22, 2011 at 12:29 PM, Nick Amland < namland@dimagi.com> wrote:
Hey,
https://www.commcarehq.org/a/namland/apps/view/051ef446971a2d6e3ad0f99c5f56a8bb/?m=&f= (here
is the link to my release manager page). Let me know if you need my creds.The date was correct on the phone.
thanks,
NickNick P. Amland
CommCare Field Fellow
Dimagi, Inc.
Dodoma, Tanzania
Google Voice: 253.642.7790
TZ Mobile: +255 762 740 996
Email: namland@dimagi.com namland08@gmail.comOn Tue, Mar 22, 2011 at 6:32 PM, Clayton Sims < csims@dimagi.com> wrote:
Nick,
The xform shouldn't be capable of making the jad/jar
invalid, that sounds like a deeper problem.Can you link me to the build you were trying to download?
Also, was the phone's date set correctly when you tried to install the app?-Clayton
On Tue, Mar 22, 2011 at 2:16 AM, Nick Amland < namland@dimagi.com> wrote:
Hey Drew,
That xforms demo location is pretty cool. That's what I
was envisioning for the ID display in the UI.I tried uploading the form into the form designer and
making a build to put the form on the phone. I got the new JAR and JAD on
the SD card, but the application was "invalid". I don't think it was the
xform because I think there is something quirky with the xform upload
functionality in the form designer right now. I've ticketed the problem and
let Anton know about it.I'm still interested to see this on a phone or emulator.
So, I'm trying to "test" your altered form in the javarosa-xform
validator's emulator. I've having some problems with this, but I'm going to
review the directions again and see if I can't figure it out first.Thanks for pointing me towards that bitbucket page -
really helpful.Nick
Nick P. Amland
CommCare Field Fellow
Dimagi, Inc.
Dodoma, Tanzania
Google Voice: 253.642.7790
TZ Mobile: +255 762 740 996
Email: namland@dimagi.com namland08@gmail.com---------- Forwarded message ----------
From: Drew Roos droos@dimagi.com
Date: Wed, Mar 16, 2011 at 10:18 PM
Subject: Re: Random ID Generator
To: Nick Amland namland@dimagi.comyou'll also need a relatively recent build of commcare in
order to use the random generator functionality. built within the past 3
weeks or so.On Wed, Mar 16, 2011 at 3:15 PM, Drew Roos < droos@dimagi.com> wrote:
dude, talk to me via the commcare-users list!
here is the form you gave me. i just pasted in the
snippets i sent you in the previous email into the relevant sections of the
xform. you can play with it here:
http://xforms.dimagi.com/enter/46 (note that the xform
on xforms.dimagi is not exactly the same as the one attached in this email;
i had to remove some things that xforms.dimagi doesn't support, but nothing
relevant to this discussion).if you need more help with xforms fundamentals, i
suggest you read:
https://bitbucket.org/javarosa/javarosa/wiki/buildxforms,
and get on skype and find me, clayton, and crew in the CommCareHQ skypechat
(ping one of us; we'll add you).On Wed, Mar 16, 2011 at 3:42 AM, Nick Amland < namland@dimagi.com> wrote:
Hey,
I haven't yet built the new household follow-up form
which is where this ID generator would need to be. I expect to build that
new household follow-up form soon (within the next week). In the mean time,
I've attached the old xform because the new one will look similar to this.
Let me know what you come up with.Thanks,
nickOn Tue, Mar 15, 2011 at 9:30 PM, Drew Roos < droos@dimagi.com> wrote:
i can give you all the help you need. just ask any
questions you have on the commcare users list (jon wants everything publicly
documented for posterity). the list is
commcare-users@googlegroups.com.bhoma doesn't actually display the random ID to the
user, so that example won't help you. do you have an existing form you can
paste those snippets into and run?On Tue, Mar 15, 2011 at 10:36 AM, Nick Amland < namland@dimagi.com> wrote:
Hey Drew,
Sorry for not promptly responding to this.
Okay, I understood some of that.
I'm not
really that "techy" (really at all compared to everyone else), so is someone
that can help me set this up?Is there a way I download a demo of the BHOMA form,
so I can see what this generator looks like in the UI?Thanks,
NickOn Thu, Mar 10, 2011 at 1:22 AM, Drew Roos < droos@dimagi.com> wrote:
shit, forgot about this email.
On Mon, Mar 7, 2011 at 3:25 AM, Nick Amland < namland@dimagi.com> wrote:
Hey Drew,
After talking with the rest team in Boston, they
think that they can re-use the random ID generator that you built for BHOMA
to satisfy our requirement down here. I don't really know much beyond that
is randomly generates an ID. So, I wondering if I can ask you some more
specifics about the generator.
- How is the generator accessed on the phone?
the ID itself is set into a hidden field. then, when
you want to show the ID to the user, you add it to an info message.in instance:
<verification_code />
<info_verif_code />in binds:
(this will produce a random number between 1 and
999; change 998 to 9998 to add another digit)
(don't get fancy with this calculate w/o talking to
me first, or else the number may change unpredictably from what you expect
(such as using inside a ))in the controls:
The code for
this visit is . Write this down and
give it to the head of household.
- What does it look like to the user?
They'll see the message above when they get to
that part of the form
- How many digits is the random ID? Always
the same number of digits?the above calculation produces numbers with up to 3
digits, but numbers like 7 and 45 will show as written, not like '007' and
'045'.
- Does the ID generator save a log of IDs
generated or capable of doing that?there is no log per se, but the generated number
will be present in the submitted xform.I wrote a quick specification for our proposed
verification process. Here is the technical requirements section for the
process.
Technical: We need CC to generate a temporary,
random household visit ID. This ID doesn’t need to be unique, even it would
be okay to have the same household with the same ID at one time. The ID
just needs to be random enough that the CHV can’t guess a pattern.Technical
Requirements:· CommCare to generate a temporary, random
ID.o Must be relatively random
§ Must pass easy to guess pattern
§ Must minimize (but not required to eliminate)
the probability of generating the same ID on consecutive visits§ There is no big clustering around individual
numberso Must be an integer
o Must be positive
o Should be 3 or 4 digits long
- · In terms of when specifically (or
how) CC will generate the ID, our first priority is to have the ID generated
within the household follow-up.- · The household ID data entry field
is added to the household follow-up form:o It needs to be a REQUIRED field
- CommCare must log the IDs generated (for our
reporting purposes).Any comments on that? Does it seem realistic for
the BHOMA generator to satisfy these requirements without significant
technical effort?Thanks for any response/input.
Nick
--
Nick P. AmlandCommCare Field Fellow
Dimagi, Inc.
Dodoma, Tanzania
Google Voice: <253.642.7790> <253.642.7790><253.642.7790><253.642.7790><253.642.7790>
253.642.7790
Email: namland@dimagi.com namland08@gmail.com--
Nick P. AmlandCommCare Field Fellow
Dimagi, Inc.
Dodoma, Tanzania
Google Voice: <253.642.7790> <253.642.7790><253.642.7790><253.642.7790>
253.642.7790
TZ Mobile: <%2B255%20762%20740%20996><%2B255%20762%20740%20996><%2B255%20762%20740%20996><%2B255%20762%20740%20996>+255
762 740 996
Email: namland@dimagi.com namland08@gmail.com--
Nick P. AmlandCommCare Field Fellow
Dimagi, Inc.
Dodoma, Tanzania
Google Voice: <253.642.7790> <253.642.7790>
253.642.7790
TZ Mobile: <%2B255%20762%20740%20996><%2B255%20762%20740%20996>+255
762 740 996
Email: namland@dimagi.com namland08@gmail.com