Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

is filtering portals what i want?


veganboyjosh

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

Recommended Posts

i have 3 files.

1. clients -each client=1 record.

2. subs -each sub=1 record

3. referrals/jobs -each referral/job=one record with one client and one sub. on jobs that require two subs, two records are reated for the same client on the same day.

i currently have a portal in the client file that tells me which sub has worked for them before, but it tells me each and every time they worked. ie. if they worked for the client 10 times, i see their name there 10 times before the next sub. i would like to only see each sub's name once. i'm thinking i need to somehow count the records when a sub works for a record, and the portal would only grab the first time a sub worked for a client... but i can't get my head around how to go about this. is there a better way, or do you kids have any advice? thanks in advance...

josh

Link to comment
Share on other sites

Hi,

The best way is to switch from your actual key field to a new one that would be a calculation that would return the "key" once only.

You could use a Case calc in the related file B)

c_showonlyone = Case(Record_Id = Max(seljoinOnKey), Key, " ")

As this calc is related, you need to index it using the Modification Time as a new relationship for a lookup (well covered in the Article Forum here - How to index an unidexable field ...).

Another way (workaround though) would be to keep your actual key but to sort the relationship using a flag calculation.

For instance, you could keep the same c_showonlyone changing it to

c_showonlyone = Case(Record_Id = Max(seljoinOnKey), 0, 1).

Then, when sorted, all records with 1 will show first, but you will still have the records marked 0 there at the end of the portal.

You could even have the record appears as an empty field....

There may be other solution, but that's currently what I'm using.

Link to comment
Share on other sites

In Clients create a relational value list returning the IDs of the Subs that worked for a client

In Clients create a calc field, unstored

ValueListItems (ClientsFile, TheRelationalValueList)

So if you have that a Clients has 6 related records in the referrals/job file the calc field will return one instance of each Sub that worked in the 6 jobs

Relate the calc field to the Subs file and a portal will show you the related Subs, only once

HTH

Link to comment
Share on other sites

Hi,

Oh Yes !

This way you changed the "direction" of the portal from the "Line Item" to the "Subs"...

I like that and will surely switch to this method also.

If what we want is a list or/and some general infos from the sub, this is surely the BEST method.

And if we want some related information from the Sub to this Client, we'll trigger a Go To Related Record in the Line Item from this new portal...

Thanx.

Link to comment
Share on other sites

this is a great solution and i see why it will work. but i can't seem to make it work. when i try to enter the calculation for the unstored calc field, i type valuelistitems (client database, sitters) and it tells me that it can't find the "client database" field.

when i click on valuelistitem, i can tell it wants a db name, cos it comes up once clicked valuelistitems(dbname, value list)

but when i try to tell it which db to look in, it tells me that field is not found. i'm under the impression that valuelistitem wants a db name and a value list to insert into the calculation.

am i doing something wrong? i hope this is clear.

thanks for your help.

josh

ps...i relaize this thread is now no longer about portals, but it will be when i get this issue firgured out. besides, i dunno how to move threads to other forums, and/or what the protocol is for such things.

Link to comment
Share on other sites

yeah, i tried that. it responds like it's looking for the filename to be a field name, and of course i don't have a field named the current db name, so it can't find it. (btw, i tried making a field return the current filename, and reference that, but that didn't work either.)

like i said, i see why this solution should work, i'm just not able to make it accept the "(filename, valuelist)" part of it. it thinks the filename should be a field. weird.

thanks again for your help.

Link to comment
Share on other sites

ok,. i got it to work. but the value list only shows up in the calc field if i format it to return pop-up/check box/radio buttons. if it's just a standard field, then it returns nothing.

i know i'm getting closer, but can't get my brain around this one.

josh

Link to comment
Share on other sites

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