Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

very basic search script question - n00b

Featured Replies

  • Newbies

dear all

I am a novice FileMaker user and am having some difficulty with a more complex (for me, anyhow!) database I am working on.

So far I have two layouts. One layout displays records from one table and the other from another table. I have a 'Find' button on layout 'A' that needs to take a value from a field and perform a search using that value and display the records it finds from layout 'B'.

I thought I would be able to achieve this by setting a variable and then performing a search using this variable as the search data.

I can't seem to get it to work. Here is my script that I'm trying:

Set variable [$findupn; Value:Students::UPN]

Go to layout ["Evidence - iPhone" (Events)]

Perform Find [Restore] (Action - Find records, find records when Events::UPN=="$findupn"

When I run the script the layout switches but I am told No records match this set of find requests.

I have managed to get it working by using the copy and paste functions and specifying a target field but it's a very messy way of doing things.

I also can make it work by setting an explicit value for the Perform Find action, setting it to something like 'Find records when Events::UPN=="12345" - the expected records and returned and displayed.

Can anyone please help with what must be a very simple task I am unable to get my head around?

Many thanks

Stu

Hello Stu, welcome to the forums.

Use the construct:

Go to layout ("Evidence - iPhone" (Events)

Enter Find Mode

Set field Event::UPN to $findupn

Perform Find

This might also be a case where Go to Related Records is appropriate.

Edited by Guest

You cannot use script variables in find requests, unless you have version 11. In previous versions do:

Set Variable [$findupn; Value:Students::UPN]

Go to Layout ["Evidence - iPhone" (Events)]

Enter Find Mode []

Set Field [Events::UPN; "==" & $findupn]

Perform Find []

  • 3 weeks later...
  • Author
  • Newbies

Hi

Thanks to both of you for your responses. Unfortunately I can't get either to work.

When I try

"Events::UPN; "==" & $findupn"

i get the error "An operator (e.g. +, -, *, ...) is expected here."

The contents of my 'Specify Calculation' box is:

Events::UPN; "==" & $findupn

If I change this to simply $findupn so that in the Edit Script window it reads as

Set Field [Events::UPN; $findupn]

it does perform the find, but it seems to actually replace the contents of Events::UPN even though Find Mode was entered in the previous step.

What am I doing wrong?

Many thanks for your assistance so far.

Stu

When I try

"Events::UPN; "==" & $findupn"

i get the error "An operator (e.g. +, -, *, ...) is expected here."

The contents of my 'Specify Calculation' box is:

Events::UPN; "==" & $findupn

In the 'Specify Calculation' box, enter only this:

"==" & $findupn

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.