Solved

Show related records in a portal - Filemaker Pro 9.0

Posted on 2011-02-23
9
696 Views
Last Modified: 2012-05-11
Hi, I  have customized the Inventory database included with FM pro 9.0. I added a table called "Monitoring" to monitior service / mainenance of differents piece of equipment. That table contains a number of fields and I created one field named Inventory_ID which is the same as the Inventory table. I created a relationship linking these two fields. Inventory::Inventory_ID = Monitoring::Inventory_ID. My problem is when I added a portal on my Inventory layout, the records from Monitoring don't show. I believe my relationship is not right but I can't see why. As you can see, I'm not a Database expert!  :o)
As a result, What I'd like to see is a piece of equipment (inventory) showing one or more service calls/repairs on it.

Gaston
0
Comment
Question by:Comptrib
  • 4
  • 4
9 Comments
 
LVL 9

Expert Comment

by:jvaldes
Comment Utility
Make sure that both are the same data types and you may want to trim() both to make sure there are no blanks.

What you did should work. Give some more feedback and I will help you troubleshoot it.
0
 
LVL 12

Expert Comment

by:North2Alaska
Comment Utility
How is the two ID fields created?  Are they calculation fields?  Look at the lines between the two TOs.  They should either look like crows feet or a single straight line.  Relationship.tiff
0
 

Author Comment

by:Comptrib
Comment Utility
Both fields are number. The one in Inventory is "Auto-enter Serial" and in Monitoring Regular Number.
The line in the relationship graph is straight from Inventory to crows in Monitoring with the Equal sign in between.

Thanks

Gaston
0
 
LVL 12

Expert Comment

by:North2Alaska
Comment Utility
Hmmm...  That sounds correct.  Can you share the file?
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:Comptrib
Comment Utility
Works now but tell me if I did right.....I created a global value then a script ;

Set Field [ Inventory::gInventory_ID; Inventory::Inventory ID ]
Go to Layout [ “Monitoring” (Monitoring) ]
New Record/Request
Set Field [ Monitoring::Inventory_ID; Inventory::gInventory_ID ]

Looks like it's OKay but is it the proper way to do things?

Gaston
0
 
LVL 12

Expert Comment

by:North2Alaska
Comment Utility
If you are creating the record using a button, then this a script is fine.  I don't think your script will work as you can't set the field before you create it.  What is do is this: (pseudo  code)

Create a variable and assign the ID to it
Switch to the layout covering the monitoring table
Create a new record
Set the ID field to the ID variable
Just to be sure, I always commit the records to make sure it gets saved
Switch back to the original layout.
0
 

Author Comment

by:Comptrib
Comment Utility
That makes sense. I prefer this way to work but can you tell me hoe to create the variable then. I don't see this option in the Type drop down list?

thx

Gaston

0
 
LVL 12

Accepted Solution

by:
North2Alaska earned 500 total points
Comment Utility
It's in the script step dialog. ScriptSteps.tiff
0
 

Author Closing Comment

by:Comptrib
Comment Utility
Thanks for the help. Greatly appreciated.

Gaston
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
Read about achieving the basic levels of HRIS security in the workplace.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 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

8 Experts available now in Live!

Get 1:1 Help Now