We have designed Lotus Notes forms, where we are displaying the data from the external system in a tabular format. In the tabular display we have editable fields, where user enters amount in these editable fields. Now we need to add the data from these editable fields and display in the totals field at the bottom dynamically.
Could some one please help me in this regard with code.
The current code:
The current editable fields are with name:
PE_TOBEPOSTED, PE_TOBEPOSTED1, PE_TOBEPOSTED3 and the total field is TOT_AMT. So in the field value of TOT_AMT the following code is written
w_postd := @Left(PE_TOBEPOSTED;15);
w_postd := @ProperCase(@Name([CN];@Left(w_postd;15)));
w_postd1 := @Left(PE_TOBEPOSTED1;15); w_postd1 := @ProperCase(@Name([CN];@Left(w_postd1;15)));
TOT_AMT = w_postd + w_postd1 + w_postd2
PS: I am just two weeks old in Lotus Notes development
Thanks.
Regards,
Kishore
Ok as you are totally new at this, there is a number of things you need to take into account.
First if you want the changes to happen while the user is interacting with the document in the Notes Client then you should use the NotesUIDocument object in LotusScript.
If you want the changes to happen when no UI is being interacted with you would use the NotesDocument Object.
I strongly recommend reviewing the Infocenter for the related documentation. Every LS Object reference has matching sample code.
For example here is the one for the NotesUIDocument on how to get a field from the document.
http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/topic/com.ibm.designer.domino.main.doc/H_EXAMPLES_FIELDGETTEXT_METHOD.html
You would get the text from the related fields, then use CINT method to change the strings to Integer numbers, add them and send them back to the document.