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 1352 times)
0 Members and 1 Guest are viewing this topic.
agalipalli
Member

Posts: 2


View Profile
« on: September 30, 2008, 01:55:30 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
hjkelsheimer
Member

Posts: 28


View Profile WWW
« Reply #1 on: January 08, 2009, 08:43:04 AM »

i think you would have to add an "endless loop" -- don't know what you call it officially. i see some things that i think i can help with on this, if you haven't solved it.
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!