Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding and saving a record
Message
From
23/10/2003 18:42:14
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, California, United States
 
 
To
23/10/2003 16:52:12
Scott Malinowski
Arizona Fox Software LLC
Arizona, United States
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00794308
Message ID:
00841894
Views:
26
Scott,

The form is probably "just sitting there" because it encountered the 1547 error since you haven't populated any of the fields. If it doesn't encounter errors in the BizObj.Save(), the form automatically releases.

Typically, we have code in the cListObjEditForm's PreSaveHook() to add any of our FK field values, which would like something like this:
LOCAL lcChildAlias, loParentObj, liFKValue, lcParentAlias

loParentObj = ThisForm.oCallingForm.RefBizObj.Get('ParentObjName')
lcParentAlias = loParentObj.GetAlias()

liFKValue = EVAL(lcParentAlias + '.iPKValue')
lcChildAlias = ThisForm.oCallingFormListObj.GetAlias()

REPLACE iFKField WITH liFKValue IN (lcChildAlias)
Hope that helps,
---J

>Paul,
>
>I have almost the exact issue(s) that Fred was having except for one difference. The view record contains no values when I check it in debug mode. All the fields are blank or zeros.
>
>I'm calling a clistobjeditform form from the ADD button of a clistobjedit object. I have two business objects on the calling form but NONE on the called form. The correct business object is selected in the called form, but when I press OK the form just sits there and no update occurs. A record has been added to the view but like I said, the fields are all empty.
>
>The view in question is a parameterized view and I sense this may be the issue since the table being updated by the view contains a foreign key field that SHOULD have this parameter value in it. Is there a way I can pre-populate that foreign key field when the edit form is instantiated?
>
>FYI, I get the same error #1547 that Fred received. I'm certainly confused if nothing else.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform