I have Leave DB and Employee Details DB in same Server... Employee will open the Leave DB and fill the form to apply for the leave...
In the top of the form employee's profile details will be there which will be captured from the Employee Details DB. There we will capture the total existing leaves for the employee....
When he fills the form and send it to his HOD for the Approval.... If his HOD is Approves that request, we need calculate how many days employee has applied for the leave and reduce it from the those total leaves from Employee Details DB... ie., If employee applied for 2 days leave, we need to get the existing leaves and reduce the leaves from the Master DB ie., Employee Details DB....
Everything was working fine for me... except the reduced leaves is not updating in the Employee Details DB... where it need to update...
And i had given the Message box also... where i am getting the reduced total Leaves from the Master DB...
I am using the Formula Language in a button to accomplish this...
This is my code for that Button...
@If(txt_lve_sanc="Sanctioned";@MailSend(txt_pers_officer;txtname;RecomendAuth;"Leave application of"+"_"+txtname+"for your info. & n/a pls.";"";"Click to open Link--->"+@NewLine;[IncludeDoclink]);txt_lve_sanc="Not Sanctioned";@MailSend(txtname;RecomendAuth;"";"Leave Application of"+"_"+txtname+"is not Sanctioned";"";"Click to open Link--->"+@NewLine;[IncludeDoclink]);"");
'This is the code to get the profile field
FName := "BLRNTAP1/Servers/Infotel":"EmplProfile.nsf":"fmemployee";
FiName := "Txt_Opening_EL";
Set := EL_Calc;
User := @UserName;
@SetProfileField(FName; FiName; Set; User);
Get := @GetProfileField(FName; FiName; User);
Message := "Set is " + @Text(Set) + " and Get is " + @Text(Get);
@Prompt([OK]; "Debug Message"; Message);
@Command([FileSave]) & @Command([FileCloseWindow]) ;
Here in the Message box i am getting the total leaves from the Employee Details DB after it has reduced.... It was showing fine....
What could be the prob.... I want to update the field value in that DB also....
Thanks & Regards