CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Record Security Help

Print topic Send  topic

Author Message
flash
Posted: 03/04/2003, 6:43 PM

When Adding a record, I want to insert the LoginID of the current user, but when Updating the record, I want to show the stored ID. I have added a label that displays the logged-in user name and a hidden field that causes the LoginID to be added on insert, but I'm not sure how to modify the label to let it show the logged in ID for adds, but pull the ID from the record for updates.
RonB
Posted: 03/06/2003, 6:02 AM

Yu didn't state your programming langueage but with php you add a beforeshow event for the userid textbox

global $your_reccordname;
if($your_recordname->youruseridtextbox->Value=="")
{
$your_recordname->youruseridtextbox->SetValue(CCGetSession("UserID",""));
}

Now the UserID textboxt will get filled with the session stored UserID if it's empty(when it's a new record) in all other cases it will be filled with the stored userid(when updating a record).

Ron

   


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

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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