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

How to make a new layout ...sorted..


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

Recommended Posts

Posted

Hi, I'm new to Filemaker, so I might not use the Filemaker-language yet;-)

I have two layouts, A en B. Both layouts have some of the same fields but also some different fields. I put some records in layout A and these automatically show in layout B since it are the same fields. But in layout A, I can check a box to see if someone has long hair (for instance). Now I want to make a new layout, which will be the first layout. In this layout I want to make a few buttons, the first button is for layout A and the second button is for layout B. BUT (and here's the problem) I want the records shown in layout B to be only those records of the people that have long hair (so the box I checked in layout A). After this I want to do some other searches on the people with long hair in layout B, so therefor layout B cannot just be a result of a search in layout A.

How can I make a button that if you press it, you go to layout B and only the people with long hair are shown?

I would be very thankful for some help!

Posted

Hi, kaaltje, and welcome to FM Forums!

The first thing to know is that Filemaker version 4 does not care what layout you are on, it is going to show the records in your found set regardless. The layout is completely independent of the found set; it is simply one view, so to speak, on your data. Another layout will show you the same records in a different way. (This is a bit more nuanced for Filemaker version 7, so if you've read posts or documentation on this issue pertaining to version 7, ignore those -- they will only confuse you.)

If you want only people with long hair to be shown on layout B, you would need to script your find to perform two completely separate tasks:

1. Find records for people who have long hair;

2. Go to layout B.

HTH,

Jerry

Posted

Hi Jerry,

Thank you for you reply.

I've tried what you suggested but I don't really know how to write te script. The long hair thing is a checkbox, so what I really need to no is how to tell Filemaker to show only those records where the checkbox for longhair has been 'checked'. Can you tell me how to do this?

Thanks!!

Posted

It's not working. It goes to the right layout in the end, but it shows only one record (there are 2 people of 5 with long hair) don't I have to specify the Set field thing? (I have a Dutch version, so maybe it's a little different)

Posted

If you have multiple choices in the checkbox field, you will have to add wildcards to the Find request like so:

Set Field ( theField , "*longhair*" )

This will find all records that have "longhair" (and anything else) in theField.

I'm pretty sure the Dutch version, or any language's version, will behave the same as the English version in this respect.

J

Posted

Thanks again for your reply, but it still doesn't work. The field I'm talking about has just one checking box. The field itself is called FLEXKEUZE, and the value of the checkbox is FLEXPOOL. SO now I have:

Enter Find Mode

Set Field ( FLEXKEUZE ," "*FLEXPOOL*"") (maybe here's the problem. I cannot just put *FLEXPOOL* when specifying, because Filemaker tells me that it should start with ( or " , so that's why after the comma, there are two sets of ")

Perform Find

Go To Layout ( "Layout B" )

I really appreciate your help, I hope you can help me solve this problem!

Posted

If you're just checking one box, the asterisks will not be necessary. When you specify the text to find, use one set of quotes to signify literal text. If you were to enter FLEXPOOL without quotes, Filemaker would interpret that as "the field named 'FLEXPOOL'" rather than the word FLEXPOOL, which is what you want.

J

Posted

The Field is called FLEXKEUZE. The value of this field is "checkbox FLEXPOOL". People have to check the box to let me know if they want to be in the Flexpool. In layout be I want just those people that have checked the box. So I think Filemaker should not search on records that have the text "FLEXPOOL" but that have the box checked. Unless filemaker only will see the text FLEXPOOL if the box actually has been checked. But this doesn't work. The problem starts when I want to specify the SetField-script part. I cannot just put the word FLEXPOOL in there and click ok. I HAVE to start with quotes, but when I click okay, filemaker itself also adds quotes, so i got": ""FLEXPOOL"". I don't think this is right.

Posted

I'm getting confused. Is the value of the field


FLEXPOOL





or is it 





checkbox FLEXPOOL





or is it





"checkbox FLEXPOOL"



?



To determine this, put the field FLEXKEUZE on your layout but do not format it to show checkboxes -- just leave it as a normal field.





The checkboxes are nothing but formatting on a display. If you checked the option for FLEXPOOL, then the contents of your field are





FLEXPOOL





If you check the boxes for FLEXPOOL and, say, NONFLEXPOOL, then the contents would be



FLEXPOOL

NONFLEXPOOL

when I click okay, filemaker itself also adds quotes, so i got": ""FLEXPOOL"". I don't think this is right.

This is not right; i'm not sure why FM would add quotes. Are you using the double-quote when you enter it by hand?

J

Posted

Ok, I'll try to make things easier by looking for something else. Let's start all over againg.

I have 2 layouts:

- Layout A, with contact information, e.g. NAME, ADDRESS, CITY and PHONE NUMBER

- Layout B, with the same contact information fields as in Layout A, but also with other fields about certain details, e.g. HAIR COLOUR, HAIR LENGTH, WEIGHT

In Layout A I fill in the records of 20 people. When I go to Layout B I see those same people (since Layout B contains the same fields).

Now I want one more Layout, which will be the first layout to see when we start Filemaker. On this page I want to place buttons:

- by clicking the first button, called CONTACT for instance, we go to Layout A. This works fine

- by clicking the second button, called DETAILS, I want the following to happen:

I want to make a script with search criteria and the results to show in Layout B. After this I can add detail information in the extra fields.

Now let's forget about the FLEXPOOL-thingy from before. Let's just say I want to search for all the people that are called John.

What I would to is:

1. Make the button in the first layout

2. Go to Scriptmaker and make a new script called NAMESEARCH

This is what my script would look like:

Go to layout ["Layout B"]

Find mode []

Set Field ["NAME = John""]

Perfom find[]

It doesn't work; Filemaker says there are no records (but i know there are!)

Posted

The script looks correct; some pitfalls you might want to watch out for:

1. The Enter Find Mode and Perform Find script steps have an option attached to them called "Restore Find Requests." In your scenario, make sure both of those are unchecked. It may be that there is a residual find request in there if those are checked. (You can verify exactly what criteria the script is using by running the script and then hitting Ctrl-R; this will show you the last find request, that is, the one the script created.)

2. It may just be the way you entered it for posting purposes, but the syntax

Set Field["NAME = John"]

is not correct. In the script, select the Set Field script step. Then click the "Field" button, choose NAME, and click OK. Then click the "Specify" button, delete anything in that box, and enter "John" (with the double quotes). That will give you a properly formed Set Field command.

If this doesn't work out, you may need to post your file to this site for us to look at it; however, i don't have a copy of Filemaker 4, so i don't think i would be able to help you if it comes to that.

J

Posted

WOW!! It works!! Thanks, you're the best!!!!! :-)

It was just a simple simple mistake, it did it the way you described it and now it works!

Thanks a lot!!!!!!!

Posted

I just added a new post about leaving out certain records by a script. I wanted to ask you, but I put it in a new post because this one will get so long and you might be fed up with my questions;-)

Thanks again!

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