Trying to work with fast itemset

Okay long story short, I have had to try to find a work around for my forms. I used to be able to use my 3rd party app to update the csv file for specific(small 3-4 objects) question lists and since I updated my code to use the fast itemsets function, all of my csv files are converted to a sqlite db and the actual csv file is renamed "*.csvimported", which breaks the form. ive messed around with the raw xml file to try to mimic the query statement that I pulled from the code and implement it to a select 1 array.

I am no stranger to java code, and have looked into several possible work arounds for the collect app. one of which would be to define a fastcsv preference to prevent the forms from being imported into the itemsets db. I have also tried to create a custom activity to import the list as an array and return the answer when selected, but am still working around the logistics of that idea.

I digress.

please mind the code, this isnt my full form, just relevant pieces.

<model>
<bind calculate="pulldata('itemset', 'projectnumber', 'pjid_key')" nodeset="/sand2/projectlist" type="string"/>
   <bind nodeset="/sand/projects" type="string"/>
   <bind nodeset="/sand/q1" readonly="true()" type="string"/>
</model>

<h:body>
  <input appearance="search('projects')" query="instance('projects')/root/item[projects={$projects}]" ref="/sand2/projects">
      <label>Select Project Number</label>
    </input>
    <input ref="/sand2/q1">
      <label>the project <output value=" /sand2/projects "/> pulled from csv</label>
    </input>

I renamed my csv file to and itemsets.csv stays in the folder and doesnt change to "converted" and form loads, but ive been getting different error messages depending on the way I change the form. ive got multiple instances of: no such column: list_name, a few result: list_name=0 and projects=0.

When I look at the itemsets db, I can see the columns pjid_key and projectnumber, but it doesnt do the select list with the results like I feel it should be doing.

Can anyone help shine some light on this? ive tried creating the form in pure xml and also using an XLSForm but seem to be having no luck.

thanks,

I've read this email a few times and I still don't understand. Can we
take a step back?

  1. What high level problem were your original changes trying to solve?

  2. If your original changes worked, why did you switch to fast itemsets?

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Mon, Sep 15, 2014 at 12:21 PM, midnightbathtub@gmail.com wrote:

Okay long story short, I have had to try to find a work around for my forms. I used to be able to use my 3rd party app to update the csv file for specific(small 3-4 objects) question lists and since I updated my code to use the fast itemsets function, all of my csv files are converted to a sqlite db and the actual csv file is renamed "*.csvimported", which breaks the form. ive messed around with the raw xml file to try to mimic the query statement that I pulled from the code and implement it to a select 1 array.

I am no stranger to java code, and have looked into several possible work arounds for the collect app. one of which would be to define a fastcsv preference to prevent the forms from being imported into the itemsets db. I have also tried to create a custom activity to import the list as an array and return the answer when selected, but am still working around the logistics of that idea.

I digress.

please mind the code, this isnt my full form, just relevant pieces.

<model>
<bind calculate="pulldata('itemset', 'projectnumber', 'pjid_key')" nodeset="/sand2/projectlist" type="string"/>
   <bind nodeset="/sand/projects" type="string"/>
   <bind nodeset="/sand/q1" readonly="true()" type="string"/>
</model>

<h:body>
  <input appearance="search('projects')" query="instance('projects')/root/item[projects={$projects}]" ref="/sand2/projects">
      <label>Select Project Number</label>
    </input>
    <input ref="/sand2/q1">
      <label>the project <output value=" /sand2/projects "/> pulled from csv</label>
    </input>

I renamed my csv file to and itemsets.csv stays in the folder and doesnt change to "converted" and form loads, but ive been getting different error messages depending on the way I change the form. ive got multiple instances of: no such column: list_name, a few result: list_name=0 and projects=0.

When I look at the itemsets db, I can see the columns pjid_key and projectnumber, but it doesnt do the select list with the results like I feel it should be doing.

Can anyone help shine some light on this? ive tried creating the form in pure xml and also using an XLSForm but seem to be having no luck.

thanks,

--
You received this message because you are subscribed to the Google Groups "ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

okay let me simplify it even more.

I have done some trial and error stuff and still cant get it figured out.

I have taken an xlsform (search_and_select "fruits") to create a test.

  1. if I name the csv file anything except for "itemsets.csv", fast itemsets
    automatically imports the data to a db and my "List.csv" no longer exists.

  2. if I leave the name as itemsets.csv, fast itemsets ignores the file, but
    the form does not ever "see" the form. I get an error that says "External
    data for itemsets has not been imported. Maybe you forgot to include
    itemsets.csv file with your form?

I have attached both itemsets.csv and project.xml form for review.

in the search("itemsets") I have tried different names, locations, even
exact device file location aka
/mnt/sdcard0/odk/forms/project-media/itemsets (and itemsets.csv) and they
all give the same message.

thanks,

project.xml (1.14 KB)

itemsets.csv (38 Bytes)

Fantastic! exactly what I needed. Thanks a Bunch!

1.I have a 3rd party background service that reaches out to our web
applications api and downloads the latest item list and converts it into a
csv. When the form loads, it populated a select 1 list from that csv array
and set it as the answer to our forms first question.

  1. originally I didnt change anything besides updating the collect app. The
    last version of the app broke my external csv item sets by taking the file
    "projectlist.csv" and creating a "projectlist.db", a
    "projectlist.csv.imported", and a "projectlist.db-journal". that caused my
    form to break on that specific question. I have since then updated the
    xlsform converter to the one that works with external itemsets and changed
    my xls file to match.

I have tried multiple different methods to try and get the external
itemsets to load based off the comments in the ItemsetWidget.java file in
the android collect code, but with no luck. maybe my xml form needs
something else that I am completely in the dark about.

seems to me that "theoretically", the form should be able to count the
columns, create an array with the list choices, and output a select1 list
using a foreach statement like so:

for (string row : rows )
System.out.print(row);
}

I have attached a minimal copy of the xml form and a copy of the
itemsets.csv file stored in the media folder. hopefully this should help.

itemsets.csv (47 Bytes)

sand1.xml (2 KB)

··· On Monday, September 15, 2014 2:51:25 PM UTC-5, Yaw Anokwa wrote: > > I've read this email a few times and I still don't understand. Can we > take a step back? > > 1. What high level problem were your original changes trying to solve? > > 2. If your original changes worked, why did you switch to fast itemsets? > > Yaw > -- > Need ODK services? http://nafundi.com provides form design, server > setup, professional support, and software development for ODK. > > On Mon, Sep 15, 2014 at 12:21 PM, <midnigh...@gmail.com > wrote: > > Okay long story short, I have had to try to find a work around for my > forms. I used to be able to use my 3rd party app to update the csv file for > specific(small 3-4 objects) question lists and since I updated my code to > use the fast itemsets function, all of my csv files are converted to a > sqlite db and the actual csv file is renamed "*.csvimported", which breaks > the form. ive messed around with the raw xml file to try to mimic the query > statement that I pulled from the code and implement it to a select 1 array. > > > > I am no stranger to java code, and have looked into several possible > work arounds for the collect app. one of which would be to define a fastcsv > preference to prevent the forms from being imported into the itemsets db. I > have also tried to create a custom activity to import the list as an array > and return the answer when selected, but am still working around the > logistics of that idea. > > > > I digress. > > > > please mind the code, this isnt my full form, just relevant pieces. > > ```xml > > > > nodeset="/sand2/projectlist" type="string"/> > > > > > > > > > > > > query="instance('projects')/root/item[projects={$projects}]" > ref="/sand2/projects"> > > Select Project Number > > > > > > the project pulled from > csv > > > > ``` > > I renamed my csv file to and itemsets.csv stays in the folder and doesnt > change to "converted" and form loads, but ive been getting different error > messages depending on the way I change the form. ive got multiple instances > of: no such column: list_name, a few result: list_name=0 and projects=0. > > > > When I look at the itemsets db, I can see the columns pjid_key and > projectnumber, but it doesnt do the select list with the results like I > feel it should be doing. > > > > Can anyone help shine some light on this? ive tried creating the form in > pure xml and also using an XLSForm but seem to be having no luck. > > > > thanks, > > > > -- > > You received this message because you are subscribed to the Google > Groups "ODK Developers" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to opendatakit-developers+unsubscribe@googlegroups.com > . > > For more options, visit https://groups.google.com/d/optout. >

Midnight Bathtub (for lack of any other name),

I believe that you are confusing fast itemsets with another feature that
allows for .csv-based choice lists. The search() function is related to a
different .csv feature, not the fast itemsets. And it is that other feature
that is likely picking up and converting all .csv files to SQLite
databases. Sorry about that.

Go to http://xlsform.org/ and scroll down to "Dynamic selects from
pre-loaded data" (unfortunately, the internal hyperlinks don't seem to
work). That describes the search() function.

Yaw, where are fast itemsets documented? I feel like a bunch of things were
lost when the ODK website started routing everything to xlsform.org.
http://opendatakit.org/help/form-design/external-itemsets used to be very
useful, I thought, but now it redirects... and doesn't have external
itemset content.

Chris

··· On Mon, Sep 15, 2014 at 6:08 PM, wrote:

okay let me simplify it even more.

I have done some trial and error stuff and still cant get it figured out.

I have taken an xlsform (search_and_select "fruits") to create a test.

  1. if I name the csv file anything except for "itemsets.csv", fast
    itemsets automatically imports the data to a db and my "List.csv" no longer
    exists.

  2. if I leave the name as itemsets.csv, fast itemsets ignores the file,
    but the form does not ever "see" the form. I get an error that says
    "External data for itemsets has not been imported. Maybe you forgot to
    include itemsets.csv file with your form?

I have attached both itemsets.csv and project.xml form for review.

in the search("itemsets") I have tried different names, locations, even
exact device file location aka
/mnt/sdcard0/odk/forms/project-media/itemsets (and itemsets.csv) and they
all give the same message.

thanks,

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I know about the csv search, I am more wondering how to turn it off. or
atleast find out what I have to do to use the sqlite databases to in an xml
form.

:slight_smile:

··· On Monday, September 15, 2014 5:29:00 PM UTC-5, Christopher Robert wrote: > > Midnight Bathtub (for lack of any other name), > > I believe that you are confusing fast itemsets with another feature that > allows for .csv-based choice lists. The search() function is related to a > different .csv feature, not the fast itemsets. And it is that other feature > that is likely picking up and converting all .csv files to SQLite > databases. Sorry about that. > > Go to http://xlsform.org/ and scroll down to "Dynamic selects from > pre-loaded data" (unfortunately, the internal hyperlinks don't seem to > work). That describes the search() function. > > Yaw, where are fast itemsets documented? I feel like a bunch of things > were lost when the ODK website started routing everything to xlsform.org. > http://opendatakit.org/help/form-design/external-itemsets used to be very > useful, I thought, but now it redirects... and doesn't have external > itemset content. > > Chris > > > On Mon, Sep 15, 2014 at 6:08 PM, <midnigh...@gmail.com > wrote: > >> okay let me simplify it even more. >> >> >> I have done some trial and error stuff and still cant get it figured out. >> >> I have taken an xlsform (search_and_select "fruits") to create a test. >> >> 1. if I name the csv file anything except for "itemsets.csv", fast >> itemsets automatically imports the data to a db and my "List.csv" no longer >> exists. >> >> 2. if I leave the name as itemsets.csv, fast itemsets ignores the file, >> but the form does not ever "see" the form. I get an error that says >> "External data for itemsets has not been imported. Maybe you forgot to >> include itemsets.csv file with your form? >> >> I have attached both itemsets.csv and project.xml form for review. >> >> in the search("itemsets") I have tried different names, locations, even >> exact device file location aka >> /mnt/sdcard0/odk/forms/project-media/itemsets (and itemsets.csv) and they >> all give the same message. >> >> >> thanks, >> >

Chris,

I thought things would be merged in on the XLSForm side a bit faster.

http://opendatakit.org/help/form-design/data-preloading and
http://opendatakit.org/help/form-design/external-itemsets are back.

Let me know if you need anything else from the old site.

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Mon, Sep 15, 2014 at 4:02 PM, midnightbathtub@gmail.com wrote:

I know about the csv search, I am more wondering how to turn it off. or
atleast find out what I have to do to use the sqlite databases to in an xml
form.

:slight_smile:

On Monday, September 15, 2014 5:29:00 PM UTC-5, Christopher Robert wrote:

Midnight Bathtub (for lack of any other name),

I believe that you are confusing fast itemsets with another feature that
allows for .csv-based choice lists. The search() function is related to a
different .csv feature, not the fast itemsets. And it is that other feature
that is likely picking up and converting all .csv files to SQLite databases.
Sorry about that.

Go to http://xlsform.org/ and scroll down to "Dynamic selects from
pre-loaded data" (unfortunately, the internal hyperlinks don't seem to
work). That describes the search() function.

Yaw, where are fast itemsets documented? I feel like a bunch of things
were lost when the ODK website started routing everything to xlsform.org.
http://opendatakit.org/help/form-design/external-itemsets used to be very
useful, I thought, but now it redirects... and doesn't have external itemset
content.

Chris

On Mon, Sep 15, 2014 at 6:08 PM, midnigh...@gmail.com wrote:

okay let me simplify it even more.

I have done some trial and error stuff and still cant get it figured out.

I have taken an xlsform (search_and_select "fruits") to create a test.

  1. if I name the csv file anything except for "itemsets.csv", fast
    itemsets automatically imports the data to a db and my "List.csv" no longer
    exists.

  2. if I leave the name as itemsets.csv, fast itemsets ignores the file,
    but the form does not ever "see" the form. I get an error that says
    "External data for itemsets has not been imported. Maybe you forgot to
    include itemsets.csv file with your form?

I have attached both itemsets.csv and project.xml form for review.

in the search("itemsets") I have tried different names, locations, even
exact device file location aka /mnt/sdcard0/odk/forms/project-media/itemsets
(and itemsets.csv) and they all give the same message.

thanks,

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I don't know of a way to turn it off, unfortunately, but do you need to use
your .csv files from the media directory? Could you load them from
somewhere else?

Chris

··· On Mon, Sep 15, 2014 at 7:02 PM, wrote:

I know about the csv search, I am more wondering how to turn it off. or
atleast find out what I have to do to use the sqlite databases to in an xml
form.

:slight_smile:

On Monday, September 15, 2014 5:29:00 PM UTC-5, Christopher Robert wrote:

Midnight Bathtub (for lack of any other name),

I believe that you are confusing fast itemsets with another feature that
allows for .csv-based choice lists. The search() function is related to a
different .csv feature, not the fast itemsets. And it is that other feature
that is likely picking up and converting all .csv files to SQLite
databases. Sorry about that.

Go to http://xlsform.org/ and scroll down to "Dynamic selects from
pre-loaded data" (unfortunately, the internal hyperlinks don't seem to
work). That describes the search() function.

Yaw, where are fast itemsets documented? I feel like a bunch of things
were lost when the ODK website started routing everything to xlsform.org.
http://opendatakit.org/help/form-design/external-itemsets used to be
very useful, I thought, but now it redirects... and doesn't have external
itemset content.

Chris

On Mon, Sep 15, 2014 at 6:08 PM, midnigh...@gmail.com wrote:

okay let me simplify it even more.

I have done some trial and error stuff and still cant get it figured out.

I have taken an xlsform (search_and_select "fruits") to create a test.

  1. if I name the csv file anything except for "itemsets.csv", fast
    itemsets automatically imports the data to a db and my "List.csv" no longer
    exists.

  2. if I leave the name as itemsets.csv, fast itemsets ignores the file,
    but the form does not ever "see" the form. I get an error that says
    "External data for itemsets has not been imported. Maybe you forgot to
    include itemsets.csv file with your form?

I have attached both itemsets.csv and project.xml form for review.

in the search("itemsets") I have tried different names, locations, even
exact device file location aka /mnt/sdcard0/odk/forms/project-media/itemsets
(and itemsets.csv) and they all give the same message.

thanks,

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thanks, Yaw!

Chris

··· On Mon, Sep 15, 2014 at 7:02 PM, Yaw Anokwa wrote:

Chris,

I thought things would be merged in on the XLSForm side a bit faster.

http://opendatakit.org/help/form-design/data-preloading and
http://opendatakit.org/help/form-design/external-itemsets are back.

Let me know if you need anything else from the old site.

Yaw

Need ODK services? http://nafundi.com provides form design, server
setup, professional support, and software development for ODK.

On Mon, Sep 15, 2014 at 4:02 PM, midnightbathtub@gmail.com wrote:

I know about the csv search, I am more wondering how to turn it off. or
atleast find out what I have to do to use the sqlite databases to in an
xml
form.

:slight_smile:

On Monday, September 15, 2014 5:29:00 PM UTC-5, Christopher Robert wrote:

Midnight Bathtub (for lack of any other name),

I believe that you are confusing fast itemsets with another feature that
allows for .csv-based choice lists. The search() function is related to
a
different .csv feature, not the fast itemsets. And it is that other
feature
that is likely picking up and converting all .csv files to SQLite
databases.
Sorry about that.

Go to http://xlsform.org/ and scroll down to "Dynamic selects from
pre-loaded data" (unfortunately, the internal hyperlinks don't seem to
work). That describes the search() function.

Yaw, where are fast itemsets documented? I feel like a bunch of things
were lost when the ODK website started routing everything to
xlsform.org.
http://opendatakit.org/help/form-design/external-itemsets used to be
very
useful, I thought, but now it redirects... and doesn't have external
itemset
content.

Chris

On Mon, Sep 15, 2014 at 6:08 PM, midnigh...@gmail.com wrote:

okay let me simplify it even more.

I have done some trial and error stuff and still cant get it figured
out.

I have taken an xlsform (search_and_select "fruits") to create a test.

  1. if I name the csv file anything except for "itemsets.csv", fast
    itemsets automatically imports the data to a db and my "List.csv" no
    longer
    exists.

  2. if I leave the name as itemsets.csv, fast itemsets ignores the file,
    but the form does not ever "see" the form. I get an error that says
    "External data for itemsets has not been imported. Maybe you forgot to
    include itemsets.csv file with your form?

I have attached both itemsets.csv and project.xml form for review.

in the search("itemsets") I have tried different names, locations, even
exact device file location aka
/mnt/sdcard0/odk/forms/project-media/itemsets
(and itemsets.csv) and they all give the same message.

thanks,

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris,

I was not aware that my form could access anything outside the media
directory. I am going to have to give that a try.

··· On Monday, September 15, 2014 6:18:33 PM UTC-5, Christopher Robert wrote: > > I don't know of a way to turn it off, unfortunately, but do you need to > use your .csv files from the media directory? Could you load them from > somewhere else? > > Chris > > > On Mon, Sep 15, 2014 at 7:02 PM, <midnigh...@gmail.com > wrote: > >> I know about the csv search, I am more wondering how to turn it off. or >> atleast find out what I have to do to use the sqlite databases to in an xml >> form. >> >> :) >> >> On Monday, September 15, 2014 5:29:00 PM UTC-5, Christopher Robert wrote: >>> >>> Midnight Bathtub (for lack of any other name), >>> >>> I believe that you are confusing fast itemsets with another feature that >>> allows for .csv-based choice lists. The search() function is related to a >>> different .csv feature, not the fast itemsets. And it is that other feature >>> that is likely picking up and converting all .csv files to SQLite >>> databases. Sorry about that. >>> >>> Go to http://xlsform.org/ and scroll down to "Dynamic selects from >>> pre-loaded data" (unfortunately, the internal hyperlinks don't seem to >>> work). That describes the search() function. >>> >>> Yaw, where are fast itemsets documented? I feel like a bunch of things >>> were lost when the ODK website started routing everything to xlsform.org. >>> http://opendatakit.org/help/form-design/external-itemsets used to be >>> very useful, I thought, but now it redirects... and doesn't have external >>> itemset content. >>> >>> Chris >>> >>> >>> On Mon, Sep 15, 2014 at 6:08 PM, wrote: >>> >>>> okay let me simplify it even more. >>>> >>>> >>>> I have done some trial and error stuff and still cant get it figured >>>> out. >>>> >>>> I have taken an xlsform (search_and_select "fruits") to create a test. >>>> >>>> 1. if I name the csv file anything except for "itemsets.csv", fast >>>> itemsets automatically imports the data to a db and my "List.csv" no longer >>>> exists. >>>> >>>> 2. if I leave the name as itemsets.csv, fast itemsets ignores the file, >>>> but the form does not ever "see" the form. I get an error that says >>>> "External data for itemsets has not been imported. Maybe you forgot to >>>> include itemsets.csv file with your form? >>>> >>>> I have attached both itemsets.csv and project.xml form for review. >>>> >>>> in the search("itemsets") I have tried different names, locations, even >>>> exact device file location aka /mnt/sdcard0/odk/forms/project-media/itemsets >>>> (and itemsets.csv) and they all give the same message. >>>> >>>> >>>> thanks, >>>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "ODK Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to opendatakit-developers+unsubscribe@googlegroups.com >> . >> For more options, visit https://groups.google.com/d/optout. >> > >