Skip 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.

Finding records w/ variable editing repetitions

Featured Replies

ok, once again, newbie blues here.

I want to have a script auto find records using a variable input, then enter a new entry in one of it's fields. Example, you enter the computer number, and find will bring up the record for that number. Then, you would enter the job done on the computer.

I tried a script that opens the Find mode and then inputs the computer number in the computer number field. You still have to hit enter after this to actually find the record. And, unless i missed something, if you have the computer job field entry run in the script after you input the computer number, instead of letting you run the Find, it has you enter the next data thing IN the find, so you won't find the record.

Now, I saw that under Find mode, there's a specification to make it find certain records automatically. The problem with this is you have to enter a specific string there, where I want to have a variable in the condition statement. As far as I know, you can't set any local variables in a File Maker script, but I thought i'd ask the experts and see if there's some way I can get around that.

Also, something that will come up down the line, I have a field in the record as a repeating field. I can easily run an IsEmpty() loop on the field to determine if the first entry is blank or filled, but how do i manipulate the consequential repetitions? In script maker, you can go to field, or next field, but when i tried using a loop with the exit condition IsEmpty (RepeatingFieldName), it just goes on forever, i'm guessing because it's reading that at least one entry in that field is not empty.

I use a special layout with a global search field.

The find script is something like this:

Go to Layout [Find]

Pause

Enter Find Mode [do not pause & do not restore requests]

Set field [find field, global field]

Perform Find [No dialog]

Go to layout [Data]

Forget you ever saw repeating fields. Use a related file or table to store this data. A portal in the database will show the related data.

  • Author

well, i had already gone through all that on previous threads. the problem is that the people i'm creating the DB for want:

1. One line per computer, so ALL the jobs need to display horizontally

2. Ease of use. So they don't want to have to create a new portal for each new job AS WELL as a new job entry. Also, they want to use the table view to view this list, and i tried having the portals displaying only one line. In table view, only one portal shows, and it shows the first record and none of the other records.

1. Impossible requirement in the real world. Even spreadsheets have a finite number of columns.

2. You don't create new portals. You add a portal row. If you define the portal to show only one row that is all it will show unless you have scrolling enabled. Unless the portal is sorted it will display the related records in creation order.

Try somethng along these lines;

create a global field "choose computer", define the field as a drop down index based on the field containing the computer numbers/names

Create a script that will set the field "choose computer" to read the words "choose computer" whenever the file is opened

Then define the "choose computer" field as a button with an attached script that has you

Go to Field "choose computer"

Loop

pause/resume 0:00:01

Exit loop if field choose computer does not equal "choose computer"

end loop

enter find mode

set field computer number/name = Choose computer

perform find

Set field choose computer = choose computer

Go to layout ---

This will allow the useer to select a computer history to view without feeling like he's interacting with a script.

Hopefully one of the true hotshots will clean up how I've done this so it's more understandable, but that's basically it.

Oh, and I agree lose the repeating fields.

Phil

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.