CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 CCS Gives me Add/Edit/Delete - How can I do Clone?

Print topic Send  topic

Author Message
JimmyCrackedCorn

Posts: 583
Posted: 05/08/2007, 11:18 PM

I have a fairly complex table where users would like to create new records based in large part on existing records. Rather than creating a new record with a blank form, they want to "clone" an existing record and then edit that one. CCS already provides me with the Add, Edit and Delete but I'd love to figure out how to add Clone!

Does anyone know how can I accomplish this in CCS?

I found this tutorial but it looks like it is for an older version of CodeCharge,

http://www.rexdesign.com/ccs/kb.php?language_id=1&categ...=63&event_id=87

anyone know if it works with current version?


_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
mamboBROWN


Posts: 1713
Posted: 05/09/2007, 3:58 PM

JimmyCrackedCorn
One way is by simply allowing the user to look at a listing (grid) of existing records with different commands (edit | copy | Record Data). When the users selects the copy/clone button/link then you would execute a custom code that would copy the existing record, create a new record (with the existing record data) and allow the user to edit the cloned record. Hopefully this will give you a starting point.
View profile  Send private message
Benjamin Krajmalnik
Posted: 05/09/2007, 5:11 PM

Another way would be to go into the "Edit" mode of the record.
Add another button which is available when in edit mode - which you can call
"Clone".
It's action would be "Insert", and in its OnClick Server event you would
clear the primary key value so that the server will alocate it (or if you
compute them, just copute them there).

JimmyCrackedCorn

Posts: 583
Posted: 05/10/2007, 11:34 AM

Thanks mamboBROWN and Benjamin. I'll give both ideas a try and report back here!
_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
TheunisP

Posts: 342
Posted: 05/14/2008, 2:44 AM

has any one tried this - and got it to work - I have set that clone button to visible all over and no dice - secondly any idea where the unique would be?
View profile  Send private message
ReneS

Posts: 225
Posted: 05/14/2008, 4:43 AM

Hi,

try this: http://forums.codecharge.com/posts.php?post_id=59765

works like a charm,

Rene
View profile  Send private message
TheunisP

Posts: 342
Posted: 05/19/2008, 11:53 AM

thanks R - this was the solution - I just added another button with the name Clone - otherwise I would have lost the user ;-)
View profile  Send private message

Add new topic Subscribe to topic   


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

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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