srinivas
26th December 2001, 07:55
Hi,

I have a maintain session for which i have created an AFS using ttstpcreatdll.

I have an update session through which using API calls i put the values in the table. It works till now.

My question is suppose i have two fields in the table say A and B then i have some formula like B=2.5*A wriiten in the after field of A in the maintain session then if i use API B is not getting updated accordingly. If i don't supply B then B is coming as Zero. The "Maintain Session" has calculation formula for B and why it is not getting updated? Otherwise what is the use of API if it cannot include the logic of the Session. Data can be directly out into tables using exchange scheme also. What addition functionality API,AFS offers?

Thanks and Regards,
Srinivas

mark_h
26th December 2001, 15:28
Since we do not have source code I have not had the chance to stick a session in debug mode to see what events do and do not occur. In some of my function servers I have had to set fields that normally get filled by the session - I am not sure why. It is my understanding that with exchange schemes you load one table at a time and if there are supporting tables then you have to also load them. With the API function servers you typically do not have to do this. Fill in the fields on the session and it does the rest. I would rather do this than have to worry about the referential integrity when using exchange schemes.

I believe in some cases Exchange Schemes are okay, but in most cases I would use function servers. I am sure there are others that prefer exchange schemes, but I think API function servers are the best method for loading mass amounts of data.

Mark

srinivas
27th December 2001, 08:24
Hi Mark,

Thanx for the input. I have put my code in check.input instead of before field and it got updated accordingly. the desired result of B=x*A is achieved.

Now if I would like to use API,AFS for standard sessions since I cannot have standard script should I write code in AFS so that it works as if user inputs data from the session. For instatnce if I use this for Maintain receipts session and have the received quantity in the input ascii file how the back order qty should be updated in the table? Will it be updated automatically or it needs some more code to be written in AFS assuming I don't have standard script for Maintain Receipts Session

Thanks and Regards,

Srinivas