Hello Dan,
 
I hope this will give you the right way. If yes, I will be happy to get a feedback.
 
To see how it work, make a subscription here:
 
(it is still in German and a part of our "MailCenter" that works also fine for the Chamber of Commerce http://www.xop.de/ihk/ in Germany)
 
 
O! yes, - "Fachgebiet" can mean "Your course"
 
regards
 
Mit freundlichen Gr��en, with best regards
 
Daniel Richardy
 
________European Witango Mainland Distributor __________
 
SoftDes GmbH - St. Georgener Strasse 13 - D 79111 Freiburg
Web: www.softdes.de                    Mail:  [EMAIL PROTECTED]
Phone: +49 - 761 - 4 555 666         Fax: +49 - 761 - 4 555 660
_________________ www.witango.net  ___________________

 
First Search Action in the user record, who I store the subscriptions in one single field (Abonennten.Themen) after a subscription (very fast for the assign in my case of application, because we have some 1000th of subscriber. On all update, i overwrite just only this field with the new selected or deselected fields).
 
But you can make a another assign to the value "subscriptions" over a rows loop...
 

<@ASSIGN NAME="subscriptions" VALUE="<@COLUMN 'Abonnenten.Themen'>" SCOPE="User">

Then i build up my Form with a another Search, where i search the "Fachgebiete/Your Courses"

<SCRIPT LANGUAGE="JavaScript">

<@assign name="Anzahl_Daten" value="<@NUMROWS>" Scope="USER">

<!-- Begin

function checkAll() {

for (var j = 1; j <= <@NUMROWS>; j++) {

box = eval("document.checkboxform.C" + j);

if (box.checked == false) box.checked = true;

}

}

function uncheckAll() {

for (var j = 1; j <= <@NUMROWS>; j++) {

box = eval("document.checkboxform.C" + j);

if (box.checked == true) box.checked = false;

}

}

function switchAll() {

for (var j = 1; j <= <@NUMROWS>; j++) {

box = eval("document.checkboxform.C" + j);

box.checked = !box.checked;

}

}

// End -->

</script>

<FORM Name="checkboxform" METHOD="POST" ACTION="<@CGI><@APPFILE>?_function=update&<@UserReferenceArgument>">

<TABLE BORDER=0>

<TABLE Width=480>

<TR ALIGN="LEFT" VALIGN="TOP">

<TD><HR><BR>Select your course. Selected fields are allready subscribedBR>

<@ROWS>

<input type=checkbox name="C<@CURROW>" value="<@COLUMN 'Fachgebiet.UID'>"

<@IF

EXPR='<@LOCATE STR="@@User$subscriptions" FINDSTR="<@COLUMN 'Fachgebiet.UID'>"> = "0"'

TRUE=""

False=" checked">

BUT YOU CAN ALSO SHOW NOTHING, IF HE IS ALLREADY SUBSCRIBED !!!

>&nbsp;&nbsp;<@COLUMN 'Fachgebiet.Fachgebiet'>

<BR>

</@ROWS>

<BR><BR><CENTER>

<input type=button value="Select all" >&nbsp;&nbsp;&nbsp;&nbsp;

<input type=button value="Select nothing" >&nbsp;&nbsp;&nbsp;&nbsp;

<input type=button value="Reverse the selection" >

<BR>

<BR>

<BR>

<INPUT TYPE=SUBMIT VALUE="Save"> </TD></TR>

Thats all !
Enjoy it (also the JavaScript, what can also use for another solutions)

regards
 
Daniel Richardy
----- Original Message -----
From: Dan Stein
Sent: Thursday, May 23, 2002 5:05 PM
Subject: Witango-Talk: Best Way to do...

First thanks to everyone who has helped with my questions. I am learning a
lot from this project and much of it is from the kind help of people on the
list.

I know that is what the list is for, but I just wanted to say thanks.

So on to the next thing.

I need to make sure people do not sign up twice for the same course. I don't
want to even bother them with a message if they do I just want the who
insert step to be skipped and a result to show that says You were already
registered for this course. Please check you current course registration
list before you select a course. Or I might not even bother with that and
just use the same message as it the signed up the 1st time.

So I do a search anyway when they come into registration that displays their
current course list. I also assign this result set to @@local$currentList
and the count of the rows to @@local$num_currentList

When they select a course from the course list ( a result of a search action
on the 1st form) and then go to detail and then submit that I do an insert
into Staff_Records table of the course they selected and A Cross_Link ID
which allows for inserts of courses that run multiple days.

What I need to do is before that insert check to see if the course_ID is
already in the @@local$currentList and this is where I am a little lost.
Looping through that array looking for a match and then not doing the insert
if their is one.


And is that they best way to do it.




--
Dan Stein
Digital Software Solutions
799 Evergreen Circle
Telford PA 18969
215-799-0192
610-256-2843
Fax 413-410-9682
FMP,Tango, EDI,SQL 7
[EMAIL PROTECTED]
www.dss-db.com


________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Reply via email to