Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Changing a search key for a portal from the Master


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

Recommended Posts

Posted

I plead total newbie status on this one !

What I'm trying to do is set up a search key field in the source file for a portal/relationship, which can be calculated to be something different each time I change a field in the Master. For example, I have client records in the source file which are flagged as either (M)usic or (H)i-fi by a text flag, _flag. My searching field in the source file is called _c_searchkey and I want it to be either equal to _t_city & _flag, or _d_date & _flag, or _t_lastname & _flag, depending on whether I set a field in the Master called _t_searchtype.

However, Filemaker won't allow the resulting calculation to be stored as it refers to the client ::master relationship, so I can't use it in the Master ::client relationship because it can't be indexed. I've tried making it Global in the client (source) file but it won't allow that either. I don't want to run Find scripts as this gets messy.

Help !

Chris Eccles

Co Clare

Republic of Ireland

Posted

Not sure if I am getting this right, but hey.....

In your related file you have the field _c_searchkey?

And this needs to be _t_city & _flag, or _d_date & _flag, or _t_lastname & _flag?

And in the master database, you have a portal, that depending on what you choose here, changes what is displayed in the portal?

OK. Well, if I got all that right.... then

Make _c_searchkey

_t_city & _flag & "PP" & _d_date & _flag & "PP" & _t_lastname & _flag

##where PP is the carriage return symbol##

Now, in your main file, create two globals, that allow you to make the choice of the two matching fields, then create a calculation of those globals, that is global 1 & global 2.

Use these two calculcation fields as your relationship and you should be able to display different information based on the selections you make.

If this doesn't help, let us know if we are closer?

Posted

Well, I am eternally in your debt, kind Sir ! !

They don't tell you these things in the books, do they ..........

What you suggest does, indeed, appear to work. (Although my

not-yet-accustomed-to-Filemaker brain cannot figure quite how it is

doing it !)

Cheers

Chris

Posted

OK Chris,

explanation time.

What is happening is on the main file side you have the calculation coming from two globals. This works only on the left hand side of a relationship. This side can be unstored.

On the right, you have what we like to term a multikey field. This is simply a list of items seperated by a return.

Because each line is seperated by a return, then each line can be seen by the left side of the relationship as a match, therefore completing the relationship.

Hope this helps you to understand this some more.

Always glad to help out.

Posted

Thanks for all of that, Andy. Very nice to encounter people who actually KNOW how to drive this Filemaker truck ........... I was also mildly surprised to find someone forum-watching at about 7 am on a Sunday morning (Florida time) ! !

Another thing I can't do properly (adding, thereby, to a list of almost biblical proportion) is to set up a search key field in my Master window which finds match fields which are "less than" or "greater than" a given value. My Filemaker Pro Guide (Steven Schwartz) says that this is possible and then drops the subject like a hot rock.

I have the sneaky feeling that you're going to tell me how easy it is ...........

Cheers

Chris

Posted

Chris,

First it is not a problem to help out.

Now, how do you mean find a match field less than or greater than. Is this a manual find or a scripted find.

Give us some more details and we will work the problem.

Posted

First of all, obviously it's NOT early morning in Florida, is it ? - my brain's just getting a bit blagged from all this Filemaker stuff ! That has the well-documented effect of making the planet spin in the opposite direction, as we all know ...........

It's a number field I want to use. I just need to instruct, in the Master window, the portal to display all clients whose total sales were either ">" or "<" a given figure, entered at will. The figure for total sales is held in the source file as _n_total and calculated and indexed. I can get it to do an exact match - no problem - but that's not what I need.

Any advice is very welcome.

(Oh, and it's 7:45 pm here, I think ..... !)

Cheers

Chris

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