Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Return key from a new record
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00268077
Message ID:
00268504
Views:
19
>>Complex environment question. I have a system where I can add to a customers environment, a new agreement (loan on a car or boat).
>>
>>My data is One : Many : One. One customer can have multiple accounts and each account is to only 1 asset.
>>
>>In my generating a new loan, the customer is picked from the list or added. They can then refinance an exisitng loan, or add a new asset for the loan. I need to grab the key from adding that asset, so I can use it on the loan agreement as the Fkey to the asset.
>>
>>Form in use is cmaintenancebizobject that calls a form based on cbizobjaddform. Thhey both work great, but how do I capture the REAL key value when it saves the asset to the dbf?
>>
>>I'm using views. The manual says that you can return a value from a modal form, but it's giving me a 0 insted of the real value (275 as an example). This.Form.uretVal=uid is in the click event to save.
>>
>>TIA
>>
>>__Stephen
>

>
>Did you try the View.Fields Value?!
>
>e.g. Return myView.MainKey
>
>In General Case, Direct EDIT the field value and refresh form is better than assign form object such as textbox
>value for re-direct assign field!
>
>p.s. It seems you put this question in Wrong Category!
>

The form is a modal form where the OK button closes the form. Just before it closes the key is generated. The view is unique for that form lv_SOLDSTK. My primary form uses lv_accnt_stk. That primary view is the between accnt and soldstk. Getting back to my need for a new key in just soldstk, so I can create a transaction in accnt that binds the two.

__Stephen
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform