Solved

How to Search Table for Related Records in the Same Table

Posted on 2010-11-10
11
651 Views
Last Modified: 2012-05-10
I have a table of documents. These documents come in, are reviewed, comments are posted and revised documents are posted.  All these documents should be in the same table.

Documents are named by Task Order and Document Type:
ABC-INTRO-001-01
ABC-INTRO-CST-001-01
ABC-INTRO-002-02

When I scroll on any of the documents with ABC-INTRO, I want to see the list of the other document names and their due dates in a portal.

Each record has a field called Task Order and Document Type so each record above has ABC-INTRO in the field.

Nothing is showing up in my portal.
0
Comment
Question by:Alex972
  • 6
  • 5
11 Comments
 
LVL 24

Expert Comment

by:Will Loving
Comment Utility
I'm assuming that "ABC-INTRO" is the "Document Type"? The relationship needs to be a Self-Join relationship - meaning between two table occurrences of the same table. The Key field on both sides of the relationship will be whatever field holds the "ABC-INTRO" value. This must be an indexed field, so if you don't see "Indexed" next to it in the field list, check the Storage options under Settings.

Are you looking at the documents in List View with a portal to the related documents?
0
 
LVL 24

Expert Comment

by:Will Loving
Comment Utility
I copied this from your other question which I suggest you delete. Please be sure to post your response with the original question.

>  I should have mentioned this in the question, but I forgot that sometimes ABC can
> be later in the name. When I use ABC*, it also gets XYZ-ABC-001-01.
> When I use ABC*, I also get the ones with XYZ-ABC-001-01.

Unclear.  you indicated that you were not getting anything in the portal at all. If you want to have a key that can match ABC wherever it may appear in the string then you will need to make a calculated key that gives multiple values to match on such as "XYZ", "XYZ-ABC", "ABC", etc. You need to determine what values you do and don't want to see.

To clarify, please describe which values you want to match on
0
 

Author Comment

by:Alex972
Comment Utility
Sorry if that question about ABC sounded like it was about the portal. That is different. That is just a straight find for a field beginning with certain text.
I have accepted a solution for it.

To avoid that confusion, I am going to give some different examples.
Imagine that you are working with documents from different companies.
The companies are IBM and BP

The document types are Annual Report (AR) and Stock Filing (SF).
Each document type has different versions: 1, 2, 3, 4, etc.

So, the data would look like:
IBM-AR-1
IBM-AR-2
IBM-AR-3
IBM-AR-4
IBM-SF-1
IBM-SF-2
IBM-SF-3
BP-AR-1
BP-AR-2
BP-SF-1
BP-SF-2
BP-SF-2


I have a calculated field that ends up with the company and the type of document, such as IBM-SF, BP-AR, etc.

If I go to IBM-SF-1, I would like to see in the portal: IBM-SF-2, IBM-SF-3, IBM-SF-4 because the portal will be returning IBM-SF records, but I don't need to see the current one.

Since I am on IBM-SF-1, I don't need to see that one.

If I go to IBM-SF-2, I would see IBM-SF-1,IBM-SF-3, and IBM-SF-4.

and so forth.


***Since the Company and Document Type field is calculated can I index on it***



0
 
LVL 24

Expert Comment

by:Will Loving
Comment Utility
On the document side, you have a field already with the DocumentTypeVersion in it (IBM-AR-2). You need to also create a second calc field with just the DocumentType (IBM-AR)

On the viewing side there are several ways to do it depending on how you want to select/filter documents. The attached file shows one way which involves using two global fields that get set when you click on a larger list of documents (not shown in the example file). You could modify this to have a global field for Company and Report type and then filter the list of report using calculation fields as the key instead.

The point is that you need a two predicate relationship. The first part says "Match on the document type (e.g. "IBM-AR") and the second says DON'T match on the specifically selected document, e.g. (IBM-AR-2). This will give you all the ones except the currently selected.
0
 
LVL 24

Expert Comment

by:Will Loving
Comment Utility
The file did not upload. I'm trying again... document-select.fp7
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:Alex972
Comment Utility
Looked at DocumentView, but it listed 0/0 Found(Unsorted) and it did not allow me to move through records.
Document-Select.gif
0
 

Author Comment

by:Alex972
Comment Utility
Attached is a file that I created that actually does what I was looking for.
DocumentTracking.fp7
DocumentTracking.gif
0
 

Author Comment

by:Alex972
Comment Utility
Actually, there is problem, with layout. Will correct and upload.
0
 

Author Comment

by:Alex972
Comment Utility
This one is correct.
DocTracking.gif
DocTracking.fp7
0
 
LVL 24

Expert Comment

by:Will Loving
Comment Utility
Your file does the same thing and uses the same relationship technique that my example files does, the only difference is that you did it as a self-join to the same table. I did it with two tables because I assumed that you might be viewing the documents from a layout based on another table such as a contact record or an interface file that contained no real data at all.
0
 
LVL 24

Accepted Solution

by:
Will Loving earned 500 total points
Comment Utility
I just looked at the example I uploaded. I'm not sure how it happened but the one record in document view somehow got deleted. There has to be at least one record present for a relationship from a global field to work. You'll find that if you simply add a record the example file I sent that it does work.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now