Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7270 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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

Posted

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[]"

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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