a tricky question about dataAvailable

sseguron

New Member
Hi folks,

Here is the situation,

We have a SWindow in which we manage orders.
During the phase of creating a new order, immediatly after filling the CustNum field we would like to initialize other order fields according to the customer record chosen.
For that :
- we created a new procedure in the customer Sdo, that we call : InitializeOrder
- we modified the customer viewer so that on leave of the custNum field we call the proc InitializeOrder in the linked Sdo (ie Customer Sdo).

Inside the InitializeOrder of the Customer Sdo, we have (simplified) :

ASSIGN
rowobject.adr1 = "street bla bla"
rowobject.city = "city Z".

PUBLISH "dataAvailable" FROM THIS-PROCEDURE ("SAME").

Results we would like to get :
- after we leave the custnum field, we would like to get all the viewers linked to this Sdo containing these fields (adr1, city) to be refreshed.

Results :
- if we exectue this during a modification of an existin order record, things work properly (ie DataAvailable does its work).
- if we execute this during the phase of a creation of an ordre, we go through all these procedures but the DataAvailable placed at the end of InitOrder has no effect on the viewers.

Could you explain to me what is happening and a workaround or another way of doing that works whatever mode we are in.

Thanks for your help.


Sylvestre SEGURON
Project Manager

DISTRI INFORMATIQUE
 
Top