[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] [table-editor]--help
hello list...
Using [table-editor] I'm try to pass values to the accounts column via a
search in stead of the default values from mv_metadata. My search query is
notated with...
#################################
START OF CONTACTS::ACCOUNTS QUERY
#################################
in this page.
[calc]
$CGI->{viewcontact}=1;
$CGI->{noshow}=1;
if($CGI->{customer}) {
$CGI->{item_id} = $CGI->{customer};
}
if(! $CGI->{item_id} and $Session->{arg}) {
$CGI->{item_id} = $CGI->{customer} = $Session->{arg};
}
$CGI->{customer} = $CGI->{item_id} if ! $CGI->{customer};
return if ! $CGI->{item_id};
if(! $CGI->{mv_data_table}) {
$CGI->{ui_hide_key} = 1;
$CGI->{mv_data_table} = 'contacts';
}
if(! $CGI->{ui_data_fields}) {
$CGI->{ui_data_fields} = <<EOF;
code
=<center>Name</center>
name_title
fname
lname
suffix
=<center>Personal Data</center>
vip_code
budget_code
customer_no
title
department
district
school
phone_day
fax
email
weblinks
=<center>General/Shipping Address</center>
institut
address1
address2
city
state
zip
country
=<center>Billing Address <small>(if different than shipping
address)</small></center>
b_institut
b_fname
b_lname
b_address1
b_address2
b_city
b_state
b_zip
b_country
b_phone
=<center> Showcase Catalog Info.</center>
show_catalog
show_qty
show_recurring
=<center>Specialty Catalog Info.</center>
catalogs
catalogqty
=<center>Catalog Verfication</center>
lastchecked
verifiedqtydate
=<center>Comment</center>
comment
=<center>User Input</center>
created
updated
createdby
sourcecode
inactive
accounts
EOF
}
if(! $CGI->{ui_return_to}){
$CGI->{ui_return_to} = join "\0",
'__UI_BASE__/contact_view',
"customer=$CGI->{item_id}",
;
}
$Scratch->{id} = $CGI->{customer};
return;
[/calc]
[if !cgi item_id]
[bounce page="__UI_BASE__/contact_view" form="customer=[cgi customer]"]
[/if]
[comment]
#################################
START OF CONTACTS::ACCOUNTS QUERY
#################################
[/comment]
[seti list]
[query list=1
prefix=user
sql="select distinct
salesrep, accounts
from contacts
where salesrep = '[data session username]'
"
]
[user-pos 1]=[user-pos 1],
[/query]
[/seti]
[set ui_class]Contacts[/set]
[seti page_title]Contact data -- [cgi item_id][/seti]
[seti page_banner]Contact data: <B>[page href="__UI_BASE__/contact_view"
form="customer=[cgi customer]"][cgi customer]</A></B>[/seti]
[set help_name]contact.edit[/set]
[set icon_name]icon_contact.gif[/set]
@_UI_STD_HEAD_@
<P>
[table-editor
cgi=1
ui_nextpage="__UI_BASE__/contact_view" form="customer=[cgi customer]"
ui_return_to="__UI_BASE__/contact_view" form="customer=[cgi customer]"
override.updated=`$Tag->date({%Y%B%d})`
override.createdby=`$Session->{username}`
passed.accounts=`$Scratch->{user}`
widget.accounts=select
noexport=1
]
@_UI_STD_FOOTER_@
<!-- page: @@MV_PAGE@@-->
The widget output is blank. I know this query works because I'm using it on
my search page
Thanks,
TB