Jump to content

Portal Filter Dilema


Lee J

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

Recommended Posts

I have a portal which I need to filter via a specific relation.

However the relation needs to be by user name and Date.

I have a field called "Username" and antoher called "DateCreated"

From a series of popup lists I need them to be able to select the user name and then a date.

The portal will then only show the entries for those selections.

any ideas?

Huge thanks in advance

Link to comment
Share on other sites

quote:

Originally posted by byteworks:

I have a portal which I need to filter via a specific relation.

However the relation needs to be by user name and Date.

I have a field called "Username" and antoher called "DateCreated"

From a series of popup lists I need them to be able to select the user name and then a date.

The portal will then only show the entries for those selections.

any ideas?

Huge thanks in advance

You're most of the way to a solution already! All you need now are a few fields, at least in this example. There may be better ones:

Selected_Username (global, text)

Selected_Date (global, date)

Filter_Key (unstored calculation, text result) = Selected_Username&Selected_Date

Username_Date_Foreign_Key (indexed calculation, text result) = Username&DateCreated

Create a self-join relationship matching Filter_Key to Username_Date_Foreign_Key.

When you select a username in the Selected_Username field and a date in the Selected_Date field, a portal based on the above relationship will display all matching records with that username and date.

If you wanted to show all matching records that have either a matching username or matching date, then simply insert & " par.gif " & between the username and date values in Filter_Key and Username_Date_Foreign_Key calculations.

This is a basic example, of course, but should give you a good idea of where to start.

[ January 09, 2002: Message edited by: The Bridge ]

Link to comment
Share on other sites

Excellent, I have the filter working however, I have to have both fields completed for the filter to work.

Have I done something wrong?

It would be nice if they can enter "Username" or "Date" or Both

and the portal displays accordingly.

cheers

Link to comment
Share on other sites

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