Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 88131 invoked from network); 16 Jul 2010 05:09:52 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Jul 2010 05:09:52 -0000 Received: (qmail 12975 invoked by uid 500); 16 Jul 2010 05:09:51 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 12586 invoked by uid 500); 16 Jul 2010 05:09:48 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 12575 invoked by uid 99); 16 Jul 2010 05:09:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Jul 2010 05:09:47 +0000 X-ASF-Spam-Status: No, hits=4.7 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,PLING_QUERY,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of steven.prentice.87@gmail.com designates 209.85.214.196 as permitted sender) Received: from [209.85.214.196] (HELO mail-iw0-f196.google.com) (209.85.214.196) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Jul 2010 05:09:39 +0000 Received: by iwn36 with SMTP id 36so317127iwn.11 for ; Thu, 15 Jul 2010 22:09:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=26YcrYtfsmUQ5mt+GWSzM3V7Oa74K9RweL7lvHNF2/Y=; b=eeSrowJjSDjMahgkECRDg6PTCJLxunGgXepEaFnRt8idHq84Z1dR7555TcO1EwiZOz YQwHoPMxjKisgyfuP299VC6b61tH53N8TzvlTjXP4l4EoHRsTFQ+nlDHJfSNDHYs/26L 3oixiuwgd0SF7r9RvLEgVTg12uvgp82sGBzYo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=OTgrRU+M7t8IHS3YLw6DxwWXvk3gOvz9sUr9LFnd9BGu1OChfBgeRpicvJXvD2PT3q hG59ByuGUxEIDMBSCg8Tjnxd1sp9QGNYLsNWB/cqeJM0vgXUMtXPUyYGYOQvlwWVVM0Y Kkiyggeq5ZAKftWglPcEenzX9SVC2NE30jBf0= MIME-Version: 1.0 Received: by 10.231.170.79 with SMTP id c15mr347362ibz.82.1279256957565; Thu, 15 Jul 2010 22:09:17 -0700 (PDT) Received: by 10.231.143.66 with HTTP; Thu, 15 Jul 2010 22:09:17 -0700 (PDT) Date: Fri, 16 Jul 2010 15:09:17 +1000 Message-ID: Subject: why wont my list function work!?!? From: Steven Prentice To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0016e68f9dae883cf8048b7a3898 X-Virus-Checked: Checked by ClamAV on apache.org --0016e68f9dae883cf8048b7a3898 Content-Type: text/plain; charset=ISO-8859-1 i have a view: function(doc) {if (doc.docType == 'audit') { emit([doc.auditRecord.resourceType, doc.auditRecord.resourceId, doc.auditRecord.subResourceType, doc.auditRecord.subResource], [doc.auditRecord.auditStamp.createDateTime, doc.auditRecord.auditStamp.createdByAccessingSystem, doc.auditRecord.auditStamp.createdByAccessingUser, doc._id]);}} and a list function: { "criteria_filter_sp": "function(head, req){var fromdate = \"2010-03-02T07:29:30\";var row;while(row = getRow()){if (fromdate && row.value[0] <= fromdate){send(row.value[4]);}}}" } the fromDate variable will eventually be a parameter but I have hardocoded it for simplicity whilst I learn... when i curl X GET http://mycouchserver.net:5984/smpaud/_design/dates/_list/criteria_filter_sp/audit_resource_subresource_with_criteria I get {"code":500,"error":"render_error","reason":"function raised error: TypeError: chunk is undefined"} ...how can it be undefined if I have literally hardcoded the date?? S --0016e68f9dae883cf8048b7a3898--