Jump to content

Relationship Search, Display & Go To!


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

Recommended Posts

Posted

Hi everyone,

I have two files, one with a database of models, one that has a calculator to help someone decide what model they want. My goal is for the first file, that helps a customer decide, tells them they need a model in the 9000 range, and then a field in the second file holds that number for all the files.

I would want all the models in the 9000 range (or whatever figure they came up with) to be displayed on the first file. The person would then choose one of the models and be taken to its layout in the second file...

Does that make sense at all? Hopefully.

Basically, how can I search a specific field in another file, display all that meet a certain criteria (between 9000 and 9999) in a first file, and then be able to pick one and go to its layout in the second file.

Thanks for your help!

Ben

Posted

It seems like you could accomplish this with the use of a portal in your calculator database.

Create a field with a unique identifier for each product range in your model database.

Create a calc field that returns that identifier based on customer entries in your calculator databased Case("model" > "7999" & "model" < "9000", 8, "model" > "8999" & "model" < "10000", 9, etc. . .) or something along those lines.

Then create your relationship based on that identifier and place the portal in the calculator.

From there you need to script a button in each portal row to open/bring to front that model layout.

I think I have the basics covered here.

Let me know how you do with it.

Posted

Another approach is to define a global text field in your first file, I'll call it gModels. Put this field on a layout somewhere -- you may want to just make a new layout for this purpose, because we're going to script the use of it, and you don't want your users to see it. Define a relationship from gModels to your Models file based on ModelNumber, let's call it ModelMatch.

What you are going to do is use the Copy All Records script step in the Models file to grab all the serial numbers from the found set and then paste them into the gModels field. In order for this to work, you need a separate layout in Models with ONLY the ModelNumber field on it, and set to view as List.

So after your script performs your Find, it needs to do this in the Models file:

Go to Layout (ModelNumber list)

Copy All Records

Go to Layout (original layout)

...and this in the first file:

Go to Layout(Where the gModel field is)

Paste(gModel, Select entire contents)

Go to Layout(Your Portal)

So on Your Portal layout, you can display the matching models based on ModelMatch. Put a button on the portal row that goes to related record, but NOT based on ModelMatch -- based on a relationshipt by ModelNumber. (The former relates to ALL the matching models, the latter to just the one on that portal row.)

Once you do this once you'll see it's pretty simple to implement and is a very good tool to have in your bag of tricks.

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