xowiki::Page instproc www-csv-dump (public)

 <instance of xowiki::Page[i]> www-csv-dump

Defined in packages/xowiki/tcl/xowiki-www-procs.tcl

This web-callable method produces a CSV dump based on the includelet "form-usages".

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.
Source code:
if {![:is_form]} {
  error "not called on a form"
}
set form_item_id ${:item_id}
set items [::xowiki::FormPage get_form_entries  -base_item_ids $form_item_id -form_fields "" -initialize false  -publish_status all -package_id ${:package_id}]
# collect all instances attributes of all items
foreach i [$items children] {array set vars [$i set instance_attributes]}
array set vars [list _name 1 _last_modified 1 _creation_user 1]
set attributes [lsort -dictionary [array names vars]]
#
# Make sure, we the includelet honors the CSV generation
#
set includelet_key name:form-usages,form_item_ids:$form_item_id,field_names:[join $attributes " "],
::xo::cc set queryparm(includelet_key) [ns_base64urlencode $includelet_key]
# call the includelet
:www-view [:include [list form-usages -field_names $attributes  -extra_form_constraints _creation_user:numeric,format=%d  -form_item_id ${:item_id} -generate csv]]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: