Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 737
  • Last Modified:

Show related records in a portal - Filemaker Pro 9.0

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
Comptrib
Asked:
Comptrib
  • 4
  • 4
1 Solution
 
jvaldesCommented:
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
 
North2AlaskaCommented:
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
 
ComptribAuthor Commented:
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
North2AlaskaCommented:
Hmmm...  That sounds correct.  Can you share the file?
0
 
ComptribAuthor Commented:
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
 
North2AlaskaCommented:
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
 
ComptribAuthor Commented:
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
 
North2AlaskaCommented:
It's in the script step dialog. ScriptSteps.tiff
0
 
ComptribAuthor Commented:
Thanks for the help. Greatly appreciated.

Gaston
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now