WC Howard Posted January 24, 2007 Posted January 24, 2007 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?
WC Howard Posted January 24, 2007 Author Posted January 24, 2007 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?
Recommended Posts
This topic is 6513 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 accountSign in
Already have an account? Sign in here.
Sign In Now