[ic] (no subject)

Scott Andreas---Learning Services, Inc interchange-users@interchange.redhat.com
Wed Jan 9 19:23:00 2002


Hello List.

here is my situation...
I'm trying to create a new record with values from a different existing db
>From my results page I have a hyperlink on the addess with
                     <TD>[page href=__UI_BASE__/add_contact
		form="
			contact=[item-code]
			"]
	[if-item-param address1][item-param address1]<br>[/if-item-param]
	[if-item-param address2][item-param address2]<br>[/if-item-param]
           [item-param city]&nbsp;[item-param state]&nbsp;[item-param
zip]&nbsp;[item-param country]</A></TD>

On the add_contact page the form I have

[calc]
	$CGI->{catrecipient}=1;
	$CGI->{noshow}=1;

	if($CGI->{contact}) {
		$CGI->{item_id} = $CGI->{contact};
	}
	if(! $CGI->{item_id} and $Session->{arg}) {
		$CGI->{item_id} = $CGI->{contact} = $Session->{arg};
	}
	$CGI->{contact} = $CGI->{item_id} if ! $CGI->{contact};
	return if ! $CGI->{item_id};
	if(! $CGI->{mv_data_table}) {
		$CGI->{ui_hide_key} = 0;
		$CGI->{mv_data_table} = 'catalogs';
	}
	if(! $CGI->{ui_return_to}) {
		$CGI->{ui_return_to} = join "\0",
									'__UI_BASE__/contact_view',
									"customer=$CGI->{item_id}",
								;

	}
	if(! $CGI->{default.country}){
		$CGI->{default.country} =  'United States';
	}
	return;
[/calc]

[set ui_class]Contacts[/set]
[seti page_title]Create new contact][/seti]
[seti page_banner]Create new contact[/seti]
[set help_name]contact.new[/set]
[set icon_name]icon_contact.gif[/set]

@_UI_STD_HEAD_@
<P>
[table-editor
	cgi=1
	ui_new_item=1
	ui_nextpage=@@MV_PAGE@@
	ui_data_fields="code, name_title, fname, lname, suffix, vip_code, title,
department, areacode, phone_day, fax, email, weblinks, district, institut,
budget_code, address1, address2, city, state, zip, country,
b_institut,b_fname, b_lname, b_address1, b_address2, b_city, b_state, b_zip,
b_country, b_phone, catalogs, catalogqty, recurringqty, lastchecked,
verifiedqtydate, comment, completed, updated, created, salesrep, createdby,
sourcecode, inactive"
	ui_break_before="name_title, title,  address1, b_institut, catalogs,
comment, completed"
	ui_break_before_label="name_title=<center>Name</center>,
title=<center>Personal Details/Funding Data</center>,
address1=<center>General/Shipping Address</center>,
b_institut=<center>Billing Address (if different from ship to
address)</center>, catalogs=<center>Catalog Info.</center>,
comment=<center>Comment</center>, completed=<center>User Input</center>"
	override.createdby=`$Session->{username}`
	default.institut=`[data base="contacts" field="institut"
key="[item-code]"]`
]

@_UI_STD_FOOTER_@
<!-- page: @@MV_PAGE@@

[return-to click]

-->

Its the default.institut= that seems to be my problem

Any help would be greatly appreciated

J. Scott Andreas :)
IS/Programmer/WebDevelopement
Learning Services, Inc.
e-mail: sandreas@learningservicesinc.com
phone: 1-800-877-9378 ext. 146
fax: (541) 744-2056

      |
      |__earning
      (__
       __)ervices
        |
        |ncorporated
       ---    __o
     ---   _-\<,_
      --- (_)/ (_)