CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 listbox question

Print topic Send  topic

Author Message
user
Posted: 05/22/2002, 11:06 AM

I was working with ccs beta 4 and have a record form. I've added a listbox
to the form where the values are populated from a separate table, say
"preferences". The record form displays a customer record, with the listbox
displaying a set of preferences. there is a third table, a
linkCustomerPreferences table, that contains the preferences selected for
the current customer.
I.e.

linkCustomerPreferences ddl:
customerId, preferenceId
....
....

What is the proper way in ccs to have the perferences listbox display the
values in the link table preselected.

i.e. the list of all possible values shows up properly (it is just the
contents of the preferences table) but I need to incorporate the link table
values to have the correct listbox values pre-selected to reflect current
settings. Additionally, I need to record the changes in the listbox back to
the linkCustomerPreferences table. I'm not adverse to deleting all entries
in the linkCustomerPreferences table for a give customerID and inserting the
list of selected values.

I'd appreciate any suggestions you might have.

thank you.

user
Posted: 05/22/2002, 1:24 PM

I added some custom code in the "Before show" event to see if I could set
multiple listbox items to a pre-selected state:

function customer_ListBox1_BeforeShow() { //customer_ListBox1_BeforeShow
@41-F5A0D803

//Custom Code @42-2A29BDB7
// -------------------------
// Write your own code here.
// -------------------------
global $customer;
$customer->ListBox1->SetValue(3);
$customer->ListBox1->SetValue(2);

//End Custom Code

But the first listbox value, "Select Value" and the third value, are
pre-selected. Am I using the proper function, SetValue, or should I try
something else?

Thank you.


"user" <user@guest.com> wrote in message
news:acgmmk$let$1@news.codecharge.com...
> I was working with ccs beta 4 and have a record form. I've added a listbox
> to the form where the values are populated from a separate table, say
> "preferences". The record form displays a customer record, with the
listbox
> displaying a set of preferences. there is a third table, a
> linkCustomerPreferences table, that contains the preferences selected for
> the current customer.
> I.e.
>
> linkCustomerPreferences ddl:
> customerId, preferenceId
> ...
> ...
>
> What is the proper way in ccs to have the perferences listbox display the
> values in the link table preselected.
>
> i.e. the list of all possible values shows up properly (it is just the
> contents of the preferences table) but I need to incorporate the link
table
> values to have the correct listbox values pre-selected to reflect current
> settings. Additionally, I need to record the changes in the listbox back
to
> the linkCustomerPreferences table. I'm not adverse to deleting all entries
> in the linkCustomerPreferences table for a give customerID and inserting
the
> list of selected values.
>
> I'd appreciate any suggestions you might have.
>
> thank you.
>
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.