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

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

Recommended Posts

Posted

Hi there.

 

Very Newbie but trying to learn.

 

I am trying to create a "QuickFind" script (by a search field) in my layout for an iPad version (just like the QuickFind | IOS in the starter solution contacts) but I can´t get it to work.

 

I have a patient list showing on the layout "Patientoverview" that I would like to be able to perform a search in for a given name (first or lastname) in the iPad layout (without using the toolbar).

The list will contain hundreds of patients and I would like to be able to find a specific patient quickly.

 

The patient list is a list of calculation fields "FullName" created by two fields ; "Firstname" and "Lastname" in the same table "Patient".

 

I have tried to adapt several solutions from the starter solutions, but I just can´t get it to work:

 

Set Error Capture [ On ]

Set Variable [ $$FIND_SIMILAR ; Value:"" ]

Freeze Window

Perform Quick Find [ /*Patient::QuickFind | iOS*/ ]

If [ Get ( LastError ) = 0 ]

Else If [ Get ( LastError ) = 400 ]

Show All Records

Go to Record/Request/Page

[ First ]

Else If [ Get ( LastError ) = 401 ]

Go to Record/Request/Page

[ First ]

Omit Multiple Records [ Get ( FoundCount ) ]

[ No dialog ]

End If

Perform Script [ “Sorter Patientoversigt | IOS” ]

Go to Field [ ]

Halt Script

 

I think it might have something to do with the second line (in red) and I am struggling to find out how to define it (I don´t have a "sort selection" field in my layout)

 

Any help would be greatly appriciated.

 

Thanks

Posted

No, the problem is the fourth line.

For some reason you have "commented out" the name of the field the quickfind action should use.

It should look like this:

 

Perform Quick Find [ Patient::QuickFind | iOS ]

Posted

Hi BruceR.

 

Thank you for trying to help me out.

Unfortunately I still can´t get it to work. I have corrected the line you suggested.

When I click on the text field I have created (where I want to type in the firstname or lastname) it just run the script and return all of my records. I am not able to type in any names.

I have created the database from scratch pulling inspiration from some of the starter solutions and reading in Filemaker 12 in depth and The Missing Manual.

 

In my Newbie mind I still think it could have something to do with this line: Set Variable [ $$FIND_SIMILAR ; Value:"" ] since it is copied and adapted from starter solutions contacts.

What does the $$FIND_SIMILAR refer to or mean?

 

Thank you once again. I really appriciate it.

Posted

Bruce – he/she didn't comment out the parameter; FM did it automatically, because the script was copied over from the starter solution in their own file, where no such field exists.

 

Fysi - Bruce is right, the fourth line is the culprit; create a search field in your Patients table (type text, global storage), like, say, QuickFindField, and use that in the QuickFind step.

 

Then the step would look like Perform Quick Find [ Patient::QuickFindField ]

 

Make sure that the fields you want to search in are set up for Quick Find on the layout.
 

As to the second line: it sets the global variable $$FIND_SIMILAR to empty (and thereby deletes it, if it even existed); just ignore this line for now.

Posted

Perfect eos!

That brought me much further. I had just copied the search field from the starter solution. I was also creating problems for myself with this line: Perform Script [ “Sorter Patientoversigt | IOS” ] as it had a goto layout in it. I am still learning but every day I get a little more knowledge thanks to you guys.

Now I can search for any record and it will show up. Thank you. Now I just need to figure out how to set up the search field/button so I can just click "next" on the iPad it in filemaker Go after I have typed in the search word instead of the maginfying glass next to the word.

Posted

Please Update your Profile to reflect what version and edition of FileMaker you are using. Here is a quick link to your profile  MY PROFILE to help.

 

The more information you show in your Profile, the better we can answer your questions. For instance, if you have the Advance edition, we could introduce you to the Script Debugger tool (a tool that is part of the Advanced), that can help you find where your scripts are breaking.

Lee

Posted

I'm glad to see you have Advance.

 

Learn about the tools, such as the Script Debugger, Data Viewer, and the Data Base Design Report as they can help you a lot. I just did a Google Search for script debugger filemaker and got this Link. You can pretty much find videos on any thing having to do with FileMaker.

 

HTH

 

Lee

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