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

Help with mutiple finds across mutiple layouts script


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

Recommended Posts

Posted

Im not sure what im doing wrong here;

set error capture [on]

enter find mode []

Set field [Account ::Status; "Active"]

Set field [Account ::Richmond; "1"]

Set field [Project ::Month January; "1"]

perform find []

if [not get(foundcount)]

Show custom dialog [ xxxxxxxxxx]

go to layout[original layout]

else

go to layout[report]

end if

Im trying to create a script that performs a find on those 3 specific fields and only reports the records that match those 3 fields and those three fields only , Status is an edit box with the word Active in it where richmond and month january are check boxs, for some reason though only month january seems to work .

Any ideas ?

Posted

Hi,

Do you have multiple fields with different cities? Do you have multiple fields with the month (Month January, Month February) etc? Have you created custom value lists for each of these values and attached them individually to each field? Take both checkbox fields and place them on your layout without the value list attached (only as edit box). What are the values inside?

Posted

Also, you are searching in two different tables simultaneously. What is the relationship between the two tables? Which table is your layout based upon where you fire the script? IIRC, you had created multiple custom value lists with month numbers that we used for a prior requirement of yours. Are those the same checkboxes you are using here?

Posted

Hello Laretta ,

I didnt want to bother you with what seemed like such a simple question to me , yet ya found me again and im greatful. to answer your questions i did leave a few check boxs but only related to months. I was able to get the script up and running but now im confused on the differance between omit records and constrain records i believe, when i run the script it produces the data i need but not in the way i want. I want the script to find only the records where the selected items match and no others, so for example i would populate the report with records that match all 3 search criteria and not when only 1 or 2 of the 3 match, does that make sense?

Posted

i would populate the report with records that match all 3 search criteria and not when only 1 or 2 of the 3 match

Then using three Set Field[]s is exactly right because it produces an AND search where all three criteria must fit before the record is returned.

now im confused on the differance between omit records and constrain records

Neither constrain nor omit steps exist in your script.

when i run the script it produces the data i need but not in the way i want.

I do not understand this part, sorry.

I still do not have answers to the questions that I asked and I need them to help you. I am not focusing on the find first, as you can see...

Posted

Laretta -

I apoligize , to answer your questions ,

Cities - There are only Two Cities Richmond and Newport News I am useing a check box for each with values of 0 unchecked and 1 being checked this determins which office the Account belongs to. not the city of the Account

Months I have months January through december Each has a check box with the same 0 or 1 value

Status - I have mutiple status's selectable by drow down box but i only want to loctate the Status "Active" out of all of them

I am searching across two differant tables they are related by a constant ID number, The Primary Layout for the Script to fire on is a report tab on my home screen , No these are new Items not the pre existing ones.

I dont understand this statement

Then using three Set Field[]s is exactly right because it produces an AND search where all three criteria must fit before the record is returned.

If this is correct why do records appear on the return report that have a status other then Active? But it does return the Records that do have Richmond as 1 and Month January as 1

Neither constrain nor omit steps exist in your script.

Do they need to be is the question or am i over thinking it ?

Posted

Months as fields is very concerning. You really need to change that to related records. If the values you are also finding is "inactive" then you need to enter that value as ==active.

You haven't said which table you are in when searching. I asked because your results will depend upon your POV (point of view) when the script is fired. If this Status field is in the 'other' table and if there are two Status' records, then you might be 'seeing' only the first related record (which can be either record). But it is returning the Parent correctly because the search is acting on the parent table and it correctly says, "this parent has at least one related record with status = "Active".

In FileMaker, perspective is pretty-much everything ... It would be simplest to zip and attach your file.

Status - I have mutiple status's selectable by drow down box but i only want to loctate the Status "Active" out of all of them

Also, do you have it validated to restrict to one selection? If they have entered incorrect values or more than one then the Active could be appearing on the second row.

In FileMaker, multiline values are searched as individual values.

Also, sorry but I do not know what that screen shot is supposed to be showing me. :hmm: Don't be discouraged though!! :laugh2:

Posted

Laretta -

Sometimes what i type is not what i think im typeing in my head , what i ment to say is that i have only one Status field which is in the Account layout in which a drop down box is activated going to a value list which has mutiple values that could be choosen to enter into the Status field , Does that make better sense

Ill Begin working on changing the months to related Records as well that does make more sense

Ill also Try th ==Active and see how that works

Ill let you know in a few minutes

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