Welcome, Guest. Please login or register.

Login with username, password and session length
Pages: [1]   Go Down
Print
Author Topic: Trying to get the last absent date?  (Read 1034 times)
0 Members and 1 Guest are viewing this topic.
agalipalli
Member

Posts: 2


View Profile
« on: September 30, 2008, 01:52:47 PM »

Hi,

I am new to filepro and I need some help in making the following code work.
I am trying to get the list of all employees and absent date who were absent for the last time (last absent date) by looking up in database “ABSENT” from current file “Employee” (Employee has only two fields – Employee ID and Name). ABSENT index “c” is ‘absent date’. I tried building the key with only employee ID and with employee ID + Today’s date but nothing seems to work.

Here is the code I wrote:

:FF="1":goto bypass:
::FF(1,*,g)="1":
::export ascii merge =/tmp/archanagABSENT r=\n f=\t:
::merge(1)="Employee ID"; merge(2)="Emp Name"; merge(3)="Department"; merge(4)="Last Absent Date":
::write merge:
bypass::c(14,*)=c;f(10,*)=f;z(16,*)=@TD;s=1&z;:
::show "@looking for "<s:
::lookup abs=ABSENT k=(s) i=c -nl:
:not abs:end:
::c=abs(3); f=abs(5);:
::merge(1)=1;merge(2)=2;merge(3)=c;merge(4)=f;:
::write merge; end:

I would be really grateful if some one will help. Thank you for your time.

--Archana




Logged
Chris Henschen
Administrator

Posts: 5


View Profile WWW
« Reply #1 on: March 05, 2010, 10:56:28 AM »

The question I'd have is if index c is a date edit, if so then your value for the lookup would have to be as well. 
One way to test this is run the processing you have and place the value "s" from your show "@looking for "<s: line into your ABSENT index C within dclerk or rclerk.  From that point you should be able to make adjustments
Logged
Pages: [1]   Go Up
Print
Jump to:  

Valid XHTML 1.0! Powered by SMF 1.1.15 | SMF © 2011, Simple Machines | Massive Blue Theme By Cadosoas Valid CSS!