Rushhour Posted December 21, 2005 Posted December 21, 2005 Hi all Usually when a user login, system will bring user to last system record. How to actually bring user to his/her last record instead of system last record. I worked on it but only manage to come up with this.. Go to record[First] Loop If[RecordOwner = Get(AccountName)] Omit Record End If Go to Record[Next] Exit Loop If[Get(RecordNumber)=?] End Loop Show Omitted Only In '?', lets say if i were to put 25, it will only loop through the first 25 records. But i wish to loop till the last record which may consist hundreds of records.. And even when i put 'Exit Loop If[Get(RecordNumber)=25]', i have 7 'staff' records but only shows '4'.. And Im working in a IWP environment but i guess it makes no difference between iwp and with client. Help needed.. Thanks a lot.. Kelvin
aaa Posted December 21, 2005 Posted December 21, 2005 But why not such: Enter Find Mode Set Field[RecordOwner,Get(AccountName)] Perform Find Go To Last Record If your file contains 100000 records your script will work very long time.
Rushhour Posted December 22, 2005 Author Posted December 22, 2005 Hi aaa Thanks so much.. You mean the method you mention will work very long time if there are like 100000 records? 1. I actually having 2 different forms, so i am having 2 scripts that doing almost the same thing except 'RecordOwner' from different table. I tried this calling the field from other table but it don't works.. Set Field[TravelReport::RecordOwner,Get(AccountName)] Is there anyway to use 1 'RecordOwner' for all? 2. 'Show All Records' default will bring us to first 25 records. But I wish to view last 25 records. I done this it works, but is there any other better way? cos mine dun looks nice i feel.. haha.. Enter Find Mode[] Set Field[Travel Request::RecordOwner; Get(AccountName)] Perform Find[] Go to Record/Request/Page [Perform with dialog (NOT COMPATIBLE); Last] Go to Record/Request/Page [No dialog; Get(RecordNumber) - 24] Thanks a lot Kelvin
aaa Posted December 30, 2005 Posted December 30, 2005 (edited) Hi, Rushhour ! I wanted to say that omiting method will work about a long time.But the second method must work very quickly: Enter Find Mode[] Set Field[Travel Request::RecordOwner; Get(AccountName)] Perform Find[] Go to Record/Request/Page [Perform with dialog (NOT COMPATIBLE); Last] Go to Record/Request/Page [No dialog; Get(RecordNumber) - 24] I think that this is good method.What other? I am sorry! The first question i can not understand. Can you explain me attaching in the simple example. Edited December 30, 2005 by Guest
Rushhour Posted January 3, 2006 Author Posted January 3, 2006 Hi aaa Oh! i thought you are referring to this method that it will work very long so its okie now thanks. I have this field Get(RecordOwner) which gets it input from Get(AccountName). It is use to only see user own record by doing this, under account and privileges, set records can only be view when Exact (Lower(Get(AccountName)); Lower (RecordOwner)). I have 2 forms, 'travel request' and 'travel report' in my file. Both form uses this method, is it possible to combine it so i only need to create 1 'RecordOwner' field to use in both forms?? Thanks a lot Cheers, Kelvin
aaa Posted January 14, 2006 Posted January 14, 2006 (edited) Hi, Roshour! In the finish it seems that i understood your question. Let you have Record_Owner in one table. How you can know that the record_owner in the other table. May be your records in two table joined by owner...? I think that easy way is anythink like this: If you want to have one script for two tables you must to check in script layout then find. I can suggest you example, which i attached. The acount_names is: admin aaa bbb ccc ddd I attached you idea, not solution. In this way i think you can have only one script for your tables. Edited January 14, 2006 by Guest
Rushhour Posted January 16, 2006 Author Posted January 16, 2006 Hi aaa, i can't dl the file theres some error. Maybe can you try compressing it with winzip..? Thanks a lot.. Cheers, Kelvin
aaa Posted January 17, 2006 Posted January 17, 2006 (edited) Hi, Roshhour! I am sorry! I must to send you zipfile, but i attached rar. Here is the zip archiv. Rosh.zip Edited January 17, 2006 by Guest
Recommended Posts
This topic is 7154 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now