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

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

Recommended Posts

  • Newbies
Posted

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

Posted (edited)

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
Posted

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...
  • Newbies
Posted

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

Posted

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

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