couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From polutan <>
Subject [ASK] How to passing 1st view data to 2nd view??
Date Wed, 22 May 2013 05:52:56 GMT
Hello Folks :)

I learn to make a very simple accounting app using CouchDB as my data
I need to create balance sheet report, and certainly the report must be
able to show by date periode
(example: from 2013-01-01 unti 2013-0131) . My plan is create two view. And
i will doing query 2 times.
The 1st view will give me data filtered by date range. The 2nd view will
filter data from 1st view by account number range.
So.. i need to know, how to passing 1st view data to 2nd view?

Ok, what i've done so far is created two view with two different key
My 1st view named
journal_date_acc which is
having date-accountNumber key arrangement. ["2013/05/14", 1000, 1010, 1011]
then My 2nd view
journal_acc_date which is
having accountNumber-date key arrangement. [1000, 1010, 1011, "2013/05/14"]

And this is my document structure .

I've test my views, and i doing test bellow:
this is for my 1st view
Kantor Pusat"}},
Karyawan Bagian Penjualan"}}

this is test for my 2nd view
Kantor Pusat"}},

Ok, once again, how to passing 1st view data to 2nd view? I want to filter
data by date range in 1st view,,  then i want to filter it again
by account number range in 2nd view. How to?

Thank You :)

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message