template::list::element::get_reference (public)

 template::list::element::get_reference -list_name list_name \
    -element_name element_name [ -local_name local_name ] [ -create ]

Defined in packages/acs-templating/tcl/list-procs.tcl

upvar the list element to the callers scope as $local_name

Switches:
-list_name (required)
-element_name (required)
-local_name (optional, defaults to "element_properties")
-create (optional, boolean)

Testcases:
No testcase defined.
Source code:
    # Check that the list exists
    template::list::get_reference -name $list_name

    set refname [get_refname -list_name $list_name -element_name $element_name]

    if { !$create_p && ![uplevel \#[template::adp_level] [list info exists $refname]] } {
        error "Element '$element_name' not found in list '$list_name'"
    }

    uplevel upvar #[template::adp_level$refname $local_name
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: