xowiki::autoname proc new (public)

 xowiki::autoname[i] new [ -parent_id parent_id ] [ -name name ]

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

Generate names until one is available under the given parent.

Switches:
-parent_id (optional)
ID of the parent item.
-name (optional)
Base name for the generated name.
Returns:
An unused name.

Testcases:
create_workflow_with_instance
Source code:
while {1} {
  set generated_name [:generate -parent_id $parent_id -name $name]
  if {[::xo::db::CrClass lookup -name $generated_name -parent_id $parent_id] eq "0"} {
    return $generated_name
  }
}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: