Jump to content

Layout dispaying only some records


qwerty`

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

Recommended Posts

Hi,

this seems to be an easy question but it has caused me to rack my brains over the weekend.

I want to have a layout which display only certain records from a particular table. How do i go about doing it?

I have a table called employees. This table has a field called UserType which store either "Manager" or "User". I want a layout which only display those records with usertype "Manager".

I have tried creating table occurrence and performing find but they don't seems to work. Maybe i did not do them the right way. Pls advise.

Link to comment
Share on other sites

The TO allows you to reference a table for viewing data. However, limiting the viewing of certain records is possible through a portal, as opposed to not showing the record itself in form or list view.

You can create a custom priviledge set that would not allow a user to see the data for certain records while not allowing access to others..

Maybe a portal is your best bet to show a list of the records, and then script the choice of the portal record that displays the record in the main layout. Your TO can then be used to list only those records of a certain type in the portal.

HTH

Link to comment
Share on other sites

Portal maybe not be the best option on certain sceanario. On my project, I used the find option and it works well. It is a little slower than TO and portal approach but it is not noticeable to the user even with thousands of records.

Write a script that will trigger before displaying the layout. In the script, put these line:

Freeze windows

Enter find mode

set field UserType = manager

Perform find

Put some error checking get(lasterrormessage) etc... , in case there is no such user exists.

The best method is to use TO and Portal as Andy mentioned. But if it doesn't fit with your layout, use the find method.

H.P.

Link to comment
Share on other sites

This topic is 7264 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.