Understanding .csv

Hi there
I am trying to use a csv to pre-populate my form.

Below is a small part of the csv called “selections”

select_key
vehicle_key
vehicle
generator_key
generator
operations_key
operations
planning_key
planning
1
CY41MM_GP
CY41MM GP
YDP014_GP
YDP014 GP
Myller
Muyler
Quenni
Quenni
2
DH72DC_GP
DH72DC GP
TMZ126_GP
TMZ126 GP
Vuyana
Vuyana
Enriber
Enriber

And here is my choices list

list_name
setManually
order
name
label
operations_name
TRUE
operations_key
operations
vehicle
TRUE
vehicle_key
vehicle
generator
TRUE
generator_key
generator
planning_name
TRUE
planner_key
planning
core_name
TRUE
core_key
core

And the survey: (The formatting seems to have gone to pot… Sorry)

hint required type name label relevant appearance calculation
Select your Name true select_one operations_name operations_name Operations ${department} = ‘Operations’ quick search(‘selections’)
Select your Name true select_one planning_name planning_name Planning ${department} = ‘Planning’ quick search(‘selections’)

calculate vehicle_key pulldata(‘selections’,‘vehicle’,‘select_key’,${Vehicle})
calculate generator_key pulldata(‘selections’,‘generator’,‘select_key’,${Generator})
calculate operations_key pulldata(‘selections’,‘operations’,‘select_key’,${operations_name})
calculate planner_key pulldata(‘selections’,‘planning’,‘select_key’,${planning_name})

What I am trying to do, is to dynamically pull in the selection to my survey, but it absolutely refuse.

Without the “pulldata()” function, I at least get some selections, but the wrong values. From what I’ve read, it should be fairly simple. I think my problem lies in how I do the pulldata(), but have no idea how to fix it.

Regards

Hi Bergie,
We don’t yet support the pulldata() feature of XLSForms (hopefully within the next few weeks). But to do what you’re trying to do you could just use the select_one_external question type in XLSForm, which would look up a value in an external CSV file. You can combine this question type with the choice_filter / cascading feature as well. See http://xlsform.org/#external for details.

Best,

Tino

···

On Thu, May 26, 2016 at 10:26 PM, Bergie bergi...@gmail.com wrote:

Hi there
I am trying to use a csv to pre-populate my form.

Below is a small part of the csv called “selections”

select_key
vehicle_key
vehicle
generator_key
generator
operations_key
operations
planning_key
planning
1
CY41MM_GP
CY41MM GP
YDP014_GP
YDP014 GP
Myller
Muyler
Quenni
Quenni
2
DH72DC_GP
DH72DC GP
TMZ126_GP
TMZ126 GP
Vuyana
Vuyana
Enriber
Enriber

And here is my choices list

list_name
setManually
order
name
label
operations_name
TRUE
operations_key
operations
vehicle
TRUE
vehicle_key
vehicle
generator
TRUE
generator_key
generator
planning_name
TRUE
planner_key
planning
core_name
TRUE
core_key
core

And the survey: (The formatting seems to have gone to pot… Sorry)

hint required type name label relevant appearance calculation
Select your Name true select_one operations_name operations_name Operations ${department} = ‘Operations’ quick search(‘selections’)
Select your Name true select_one planning_name planning_name Planning ${department} = ‘Planning’ quick search(‘selections’)

calculate vehicle_key pulldata(‘selections’,‘vehicle’,‘select_key’,${Vehicle})
calculate generator_key pulldata(‘selections’,‘generator’,‘select_key’,${Generator})
calculate operations_key pulldata(‘selections’,‘operations’,‘select_key’,${operations_name})
calculate planner_key pulldata(‘selections’,‘planning’,‘select_key’,${planning_name})

What I am trying to do, is to dynamically pull in the selection to my survey, but it absolutely refuse.

Without the “pulldata()” function, I at least get some selections, but the wrong values. From what I’ve read, it should be fairly simple. I think my problem lies in how I do the pulldata(), but have no idea how to fix it.

Regards

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to kobo-users+...@googlegroups.com.

To post to this group, send email to kobo-...@googlegroups.com.

Visit this group at https://groups.google.com/group/kobo-users.

For more options, visit https://groups.google.com/d/optout.

Excellent idea. I will try that. I think I understand the principle, especially I can see how the filter element can help me out.

Just to be sure, from this method it seems that when I update the select_external with new choices, the actual form definition on the device has to be reloaded?

I.e. - >> Delete saved form >>Get new form?

As it is, the form definitions get installed manually and not pulled from a server. I was hoping to just send the latest .csv via email, save it in the correct folder on the device and the update happens by itself.

We do not want to create a new instance of the form every time we make a minor update to the select-one choices. This will also be an implementation nightmare as it will be impossible to load all staff data to all devices at the same time, and in fact only a limited number of staff will be affected, usually per department, so there is no need to implement a change to vehicle number to all. The main thing is to try and preserve the form definition on the server…

···

On Friday, 27 May 2016 12:44:20 UTC+2, Tino Kreutzer wrote:

Hi Bergie,
We don’t yet support the pulldata() feature of XLSForms (hopefully within the next few weeks). But to do what you’re trying to do you could just use the select_one_external question type in XLSForm, which would look up a value in an external CSV file. You can combine this question type with the choice_filter / cascading feature as well. See http://xlsform.org/#external for details.

Best,

Tino

On Thu, May 26, 2016 at 10:26 PM, Bergie berg...@gmail.com wrote:

Hi there
I am trying to use a csv to pre-populate my form.

Below is a small part of the csv called “selections”

select_key
vehicle_key
vehicle
generator_key
generator
operations_key
operations
planning_key
planning
1
CY41MM_GP
CY41MM GP
YDP014_GP
YDP014 GP
Myller
Muyler
Quenni
Quenni
2
DH72DC_GP
DH72DC GP
TMZ126_GP
TMZ126 GP
Vuyana
Vuyana
Enriber
Enriber

And here is my choices list

list_name
setManually
order
name
label
operations_name
TRUE
operations_key
operations
vehicle
TRUE
vehicle_key
vehicle
generator
TRUE
generator_key
generator
planning_name
TRUE
planner_key
planning
core_name
TRUE
core_key
core

And the survey: (The formatting seems to have gone to pot… Sorry)

hint required type name label relevant appearance calculation
Select your Name true select_one operations_name operations_name Operations ${department} = ‘Operations’ quick search(‘selections’)
Select your Name true select_one planning_name planning_name Planning ${department} = ‘Planning’ quick search(‘selections’)

calculate vehicle_key pulldata(‘selections’,‘vehicle’,‘select_key’,${Vehicle})
calculate generator_key pulldata(‘selections’,‘generator’,‘select_key’,${Generator})
calculate operations_key pulldata(‘selections’,‘operations’,‘select_key’,${operations_name})
calculate planner_key pulldata(‘selections’,‘planning’,‘select_key’,${planning_name})

What I am trying to do, is to dynamically pull in the selection to my survey, but it absolutely refuse.

Without the “pulldata()” function, I at least get some selections, but the wrong values. From what I’ve read, it should be fairly simple. I think my problem lies in how I do the pulldata(), but have no idea how to fix it.

Regards

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to kobo-users+...@googlegroups.com.

To post to this group, send email to kobo...@googlegroups.com.

Visit this group at https://groups.google.com/group/kobo-users.

For more options, visit https://groups.google.com/d/optout.

Dear Tino,

Do you have a date for the release of the pulldata feature?

Thanks,
Edouard

···

Le vendredi 27 mai 2016 13:44:20 UTC+3, Tino Kreutzer a écrit :

Hi Bergie,
We don’t yet support the pulldata() feature of XLSForms (hopefully within the next few weeks). But to do what you’re trying to do you could just use the select_one_external question type in XLSForm, which would look up a value in an external CSV file. You can combine this question type with the choice_filter / cascading feature as well. See http://xlsform.org/#external for details.

Best,

Tino

On Thu, May 26, 2016 at 10:26 PM, Bergie berg...@gmail.com wrote:

Hi there
I am trying to use a csv to pre-populate my form.

Below is a small part of the csv called “selections”

select_key
vehicle_key
vehicle
generator_key
generator
operations_key
operations
planning_key
planning
1
CY41MM_GP
CY41MM GP
YDP014_GP
YDP014 GP
Myller
Muyler
Quenni
Quenni
2
DH72DC_GP
DH72DC GP
TMZ126_GP
TMZ126 GP
Vuyana
Vuyana
Enriber
Enriber

And here is my choices list

list_name
setManually
order
name
label
operations_name
TRUE
operations_key
operations
vehicle
TRUE
vehicle_key
vehicle
generator
TRUE
generator_key
generator
planning_name
TRUE
planner_key
planning
core_name
TRUE
core_key
core

And the survey: (The formatting seems to have gone to pot… Sorry)

hint required type name label relevant appearance calculation
Select your Name true select_one operations_name operations_name Operations ${department} = ‘Operations’ quick search(‘selections’)
Select your Name true select_one planning_name planning_name Planning ${department} = ‘Planning’ quick search(‘selections’)

calculate vehicle_key pulldata(‘selections’,‘vehicle’,‘select_key’,${Vehicle})
calculate generator_key pulldata(‘selections’,‘generator’,‘select_key’,${Generator})
calculate operations_key pulldata(‘selections’,‘operations’,‘select_key’,${operations_name})
calculate planner_key pulldata(‘selections’,‘planning’,‘select_key’,${planning_name})

What I am trying to do, is to dynamically pull in the selection to my survey, but it absolutely refuse.

Without the “pulldata()” function, I at least get some selections, but the wrong values. From what I’ve read, it should be fairly simple. I think my problem lies in how I do the pulldata(), but have no idea how to fix it.

Regards

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to kobo-users+...@googlegroups.com.

To post to this group, send email to kobo...@googlegroups.com.

Visit this group at https://groups.google.com/group/kobo-users.

For more options, visit https://groups.google.com/d/optout.