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.

Trouble converting old script

Featured Replies

Greetings All!

Forgive me, I am having difficulty transitioning from the 5/6 way of thinking to the 7/8...

I had a find script that worked really well; when a user entered the parameters they were looking for into one or more fields, if more than one record was found then they would get a list layout from which to choose which one they wanted.

The script involved the Status(CurrentFoundCount), and I used an IF/Else statement that would calculate when the current found count was greater than 1, it would display this other layout other wise display the master layout.

I've tried using the Get(FoundCount), but I'm running into a wall. I tried using the Get(FoundCount) in a formula but for some reason the the If statement won't pick up or use the boolean result. I tried to create a field where the found count is global, and then tried to use that in the IF statement along with a refresh command, and it works fine once, but keeps returning the same found set after that.

In FM 5/6, we had the choice to keep or replace the found set, but I cannot find a similar command. I also feel like there's something about these "Get" functions that I'm not "getting"...

Any help, please?

  • Author

Figured it out...

Here's the syntax:

Go to Layout [ “Master” (Inventory) ]

Go to Field [ Inventory::ItemNo ] [ Select/perform ]

Enter Find Mode [ ] [ Pause ]

Perform Find [ ]

If [ (Inventory::FoundCount) - 1 ]

Go to Layout [ “Multifind” (Inventory) ]

Else

Go to Layout [ “Master” (Inventory) ]

End If

The FoundCount field is the one I created where the found count is global, not stored, from the Get(FoundCount) function. For some reason, I can't get the script to work using the Get command directly.

If the found count is 1 then the result would be zero, or false, and wouldn't need to be in the multi list. If 0, then FM would warn of no items found.

Any tips? Suggestions?

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.