joki1975 Posted December 28, 2004 Posted December 28, 2004 Hi. I need to make a script where i can find and count the number of record, where two specific values from two field in a file is used as criterion, in the query. If the number of records is > than 0 then do.... else do.. Thanks
aaa Posted December 28, 2004 Posted December 28, 2004 There is a Status(CurrentFoundCount) in FM6 which returns number of records in foundset. You dont need script for this. You can write your script as If Status(CurrentFoundCount)>0 ______ ______ Else ............. ............. Endif
joki1975 Posted December 28, 2004 Author Posted December 28, 2004 Hi. Thanks a lot. That part of the script is now working, but every time the script had performed the find funktion, i have to clik "continue" at the layout before the script will execute the rest. Is there anyway to make the script continue by it self. Thanks
joki1975 Posted December 29, 2004 Author Posted December 29, 2004 Hi. Here is my script. the script is executed from the file in the midle of a many-to-many relationship perform external script (copy value from modelid field to global field) perform external script (copy value from problemid field to global field) enter find mode set field [:modelid","model::temp"] set field [:problemid","model::temp"] perform find[constain found set] If["0<currentfoundcount] Enter browse mode[] show message["Problem already exsist to that model"] exit script else Perform script ["addrecord"] end if Thanks
aaa Posted December 29, 2004 Posted December 29, 2004 You must to find which of this script steps pauses your script and clear pause option It may be "enter find mode" or "Enter browse mode[]"
joki1975 Posted December 31, 2004 Author Posted December 31, 2004 Hi. okay it work now, but i have made it in a different way. Instead i have made a loop where i run through all the records and send a message if the data in two field in the record is equal with the data in a field in each file. But thansk for your help anyway and happy new year.
Recommended Posts
This topic is 7270 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