Jump to content
Server Maintenance This Week. ×

Showing last User Record


This topic is 6674 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 weeks later...

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 by Guest
Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 weeks later...

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 by Guest
Link to comment
Share on other sites

This topic is 6674 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.