Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Selective relationship


amiga115

Recommended Posts

Hi.

I have a self join relationship with 3 global fields, related with 3 different fields.

 

Global_name = Name and

Global_date

Global_status = status

 

This way i use a portal to see the data and it works the way I want. I use value lists and select a name, a date and a status.

My question is this: How can I see the data using only one criteria? For example using all names and all dates but a certain status? Obviously I can't use a different relation for each occasion. I tried to use wildcards, but it doesn't work.

Any suggestions?

Thanks

Link to comment
Share on other sites

Hi.

I have a self join relationship with 3 global fields, related with 3 different fields.

 

Global_name = Name and

Global_date

Global_status = status

 

This way i use a portal to see the data and it works the way I want. I use value lists and select a name, a date and a status.

My question is this: How can I see the data using only one criteria? For example using all names and all dates but a certain status? Obviously I can't use a different relation for each occasion. I tried to use wildcards, but it doesn't work.

Any suggestions?

Thanks

 

To view data in a portal you do not need Global fields. try this -

 

Name - text

Date - Date

Status - Text / Number ( depends on what you want to use )

 

As you have done create a self joining relationship Status = Status

 

Put all the fields in the portal and you are done.

 

Sujat

Link to comment
Share on other sites

I use this selfjoin relationship: Global_status = status. The global field is needed in order to choose the data in the portal. For example the global_status field uses the same value list of the status field. So when I want to see in my portal all the records that have status: Delivered for example, I choose "Delivered" on the global field and the portal gives me only those records. If I made a self join status=status, I would get all the records in my portal.

The relationships, fields and core design of the db is fine. The way it works, it gives me the records when all the criteria is true. So, when I choose a name, a date and a status, I get only those records. But I need to be able to also use one or two criteria. For example: "Give me all the records that have name "Name1" and date after "1/11/07" and status "all"" or "Give me all the names and all the dates that have status "pending"". This "all" thing is what I'm missing. I tried to use a wirldcard but it used it as a criteria. It was searching for name "*". Of course that name doesn't exist.

This is a very nice way to search the data live. I could use a find script and it would be very easy, but it would be slower and ugly..

Link to comment
Share on other sites

A relationship needs to match something, so you'll need to add calcs the tables to account for or "All" filter values.

 

The key on the parent side might be something like:

 

parent_key (calculation, text result) = case(isempty(filter);"zzzAll";filter)

 

and the key on the child side might look like:

 

child_key (calculation, text result) = field & "¶zzzAll"

 

 

In that example, when the filter is left blank, the calc populates with zzzAll, and that matches all records on the child side. I used "zzzAll" to avoid any unintensional matches with real data values.

 

 

The date range parent key is similar, but instead when the filter is blank, have the calc use a date prior to anything you might have in your data, like date(1;1;1900), or whatever. The child key can just be the original date field.

Link to comment
Share on other sites

Wow... It worked. I added a calculation field that copies the contents of the name field, adding "¶All" and I linked it to the global_name, instead of the actual name field. Then I created a button that sets the Global_name to "All" and everything works great... Then I did the same with the status field and I have all the combinations I needed.

Thanks a lot... Well, not just a lot. Countless..

 

By the way, why the return symbol "¶"? And why this solution won't work if it misses?

Link to comment
Share on other sites

The pilcrow (¶) is used in calculation dialogs to designate a paragraph return. FileMaker will match on each line of the multi-line field, giving you an OR relationship.

Link to comment
Share on other sites

Here's a demo file for using a filtered popup to show a filtered portal based on the selection in two fields.

 

Parent

Child - shows filtered popup based on selection in parent

Grandchild - shows in portal to list all related grand child records.

Link to comment
Share on other sites

Actually I cannot download the file to see what's on it. I quest, by the name, that it is an other way to display related records on a portal, using more than one relationship. I already knew how to do that. An "OR" relationship was my question and it has been answered.

Thanks...

You're great

Link to comment
Share on other sites

This thread is quite old. Please start a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

Terms of Use