Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to prevent changing retreival field on existing reco
Message
 
To
19/02/2001 15:01:57
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00476045
Message ID:
00478225
Views:
21
Gary,

>Is there a tecnnique or best place to determine what the addmode property is going to be before the refresh, so I can have the field set during the form refresh?>>

There's a new business object method in the upcoming version of the Framework called "IsNew()" that would do the trick for you. For now, you can add a temporary IsNew() method to your version of KBizObj that includes the code listed below. You can call this business object method to determine if the current record is new, or edited.

Although what I've listed below isn't really the Framework code in the upcoming version, it will work fine for now...and when you get the new version your calls to the new method will continue to work.

Here's the code:

LOCAL lcGetFldState, lcAlias

lcAlias = This.GetAlias()

IF EMPTY(lcAlias) OR !USED(lcAlias) OR ISNULL(lcGetFldState)
RETURN .F.
ENDIF

lcGetFldState = GETFLDSTATE(-1, lcAlias)
RETURN ("3" $ lcGetFldState OR "4" $ lcGetFldState)


Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform