Jump to content
Server Maintenance This Week. ×

Moving to a specific portal row from another file by scripting


FSRGuy27

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

Recommended Posts

I have a Part Entry file and an Assemblies file. An intermediate file, AssemblyPartJoin, allows me to enter multiple parts per assembly through a portal in Assemblies. In Part Entry, I have a drop down list that shows all of the assemblies that each part is contained in, with a button next to the menu that performs a script to search the Assemblies file for the record matching the assembly in the drop down list. This all works fine.

This is where I'm stuck: I don't know how to get the portal row with the Part Number in Part Entry to highlight. In other words, I want to be able to search by discrete part and go to the place in each Assemblies record (each assembly where it's included) and highlight that portal row so that I can delete it or make changes to the assembly without having to manually search through the assemblies.

Can anyone help me with this?

-Confused New Guy

Link to comment
Share on other sites

the only way i know to do that is to have a loop which starts on the first portal row and loops through them until you find your correct part. i don't think filemaker will let you jump randomly into a portal if the record you are seeking is above or below the currently displayed portal rows.

and oh yeah...be sure and have the option clicked on your "go to next portal row" step to select portal row, or it won't be of much help

hope that answers your question

Link to comment
Share on other sites

I can think of a couple of ways to do this; see if this one fits your scenario:

In the AssemblyPartJoin file, make a global field, gPartNumber.

Make a global container field, gHighlight.

Go to Layout mode, draw a small rectangle in the highlight color of your choice and Cut it. Go to Browse mode, click on gHighlight and Paste.

Create a calculated field, RowHighlight, make it a container that =

Case(gPartNumber = PartNumber, gHighlight)

In the Parts file, if you don't have a Relationship set up to AssemblyPartJoin, make one. As part of your script in the Parts file, have it Set Field (AssemblyPartJoin::gPartNumber) to the current PartNumber.

Now in the Assemblies file, put the AssemblyPartJoin::RowHighlight field in your portal and you should see the current part row highlighted when you run the script from the Parts file.

[ February 04, 2002, 04:29 PM: Message edited by: Fitch ]

Link to comment
Share on other sites

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