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
|
|
|
 |
|