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.

First Post, Script to Find current record field contents

Featured Replies

This is my very first post here. :)

This is what I got so far:

Copy [select; Main::Procedure Number]

Go to Layout ["Procedure Report" (Procedure)]

Enter Find Mode []

Paste [select; Main::Procedure Number]

Enter Preview Mode []

Print []

Go to Layout ["Assembly" (Main)]

Enter Browse Mode []

I know that I am probably going about this all wrong. The current problem with this script is the user has to press enter or click on the button "Find", where it would be nice to have the script just click find for me.

My main layout "Assembly", has a Portal with related records. The layout "Procedure Report" is a list. Why I didn't post this in the printing section of the forum is because I'm not having problems actually printing, but rather to Perform a Find based on the current record field.

So... basically I want to search on the value of a field.

So how do I "Perform Find" on any:

1) Contents of the Clipboard

2) Value of a particular field

3) Paste into find???

I'm really lost on how to do this, please help a FileMaker newbie. Thanks in advance.

  • Author

Ok, maybe I wasn't very clear, in a nutshell:

Consider the following:

Record "1" and Field "A" value is: "Happy"

Record "2" and Field "A" value is: "Sad"

Record "3" and Field "A" value is: "Calm"

How do I perform a find for "Happy" from "1A", but if I'm on "2A", search for "Sad" instead or if I'm on record "3", find "Calm".

It seams like this would be very easy, coming from a SHELL scripting background, but this ScriptMaker got's me going bonkers.

Please help.

Since you have FileMaker 8, use a script variable to transfer the contents of FieldA from the current record to find mode.

Set Variable [$Search; Value: MYTABLE::FieldA]

Enter Find Mode []

Set Field [MYTABLE::FieldA; $Search]

Perform Find []

Since you have FileMaker 8, you can also do this without a script: control-click the field, and select Find Matching Records from the contextual menu.

  • Author

Thank you very much, I'll give this a try and report back.

  • Author

Since you have FileMaker 8, you can also do this without a script: control-click the field, and select Find Matching Records from the contextual menu.

Thanks for the suggestion, however I am trying to do this in a script.

  • Author

Since you have FileMaker 8, use a script variable to transfer the contents of FieldA from the current record to find mode.

Set Variable [$Search; Value: MYTABLE::FieldA]

Enter Find Mode []

Set Field [MYTABLE::FieldA; $Search]

Perform Find []

I'm a little unsure about the first line:

Set Variable [$Search; Value: MYTABLE::FieldA]

What do I put for Value?

  • Author

Nevermind, duh! The value is part of the script! BTW, you solved my problem and thank you sooo very much, it's much appreciated.

  • Author

Now how do I use this variable in conjunction with another search parameter?

Meaning, how do I perform multiple search's?

Originally I had 2 different problems that have now melded into one problem, this is the reason for multiple posts:

http://fmforums.com/forum/showtopic.php?tid/176285/

Please, anyone who can help me with this?

  • Author

I was able to figure it out on my own and once I thought about it more, it was actually quite simple:

Go to Layout [ “Assembly” (Main) ]

Set Variable [ $Search; Value:Main::Procedure Number ]

Set Variable [ $Filled; Value:"full" ]

Enter Find Mode [ ]

Go to Layout [ “Report - Picture” (Procedure) ]

Set Field [ Main::Procedure Number; $Search ]

Set Field [ Procedure::PictureCalc; $Filled ]

Perform Find [ ]

Enter Preview Mode

Print [ ]

Enter Browse Mode

Go to Layout [ “Assembly” (Main) ]

I just added another "Set Variable" and "Set Field" to add more criteria to my search. Thanks for your help with the other topics.

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.