Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OnSaveNew
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Miscellaneous
Thread ID:
00408832
Message ID:
00408883
Views:
22
You have to do a REPLACE

REPLACE v_ViewName.Field WITH goApp.oUserMgr.cUserID

If you actually know this value at the time of adding the new record, you will be better off doing this in the OnNew method like this.... instead of during the PreSaveHook.

LOCAL loSelect

*-- Run parent class method.
= DODEFAULT()

*-- Make sure you are working in the proper work area.
loSelect = This.SelectAlias()

REPLACE v_ViewName.Field WITH goApp.oUserMgr.cUserID


>OK, the PreSaveHook sounds like the right place.
>
>What is the best way to write to a field value? I thought I could do something like: v_ViewName.field = goApp.OUsermgr.cuserID, but the wrong data session is open.
>
>Thanks VERY much for your help, I am still learning a lot about MM.
>
>Greg

Doug Stalter

"According to the proverb, the best things are the most difficult." -Plutarch
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform