It's hard to suggest much as we don't really know why the script was set up to modify this value in the first place nor how your database has been designed. From your post, it seems you have much to learn about FileMaker and also about the design of your own file. Finding someone in your area who knows FileMaker and can come take a look at yoru file would be a very good idea. If you are going to try making modifications, please make lots of back up copies of your files as you go so that if your changes have unexpected results, you can throw out the file and go back to a back up copy.
You have 5 lines in your script that make up an If statement:
If [$$SHOWACTIVEONLY = "Yes"]
Set Field [...
Set Field [....
Then you have this step:
These set field steps should be taking place in Find Mode, but there is no preceding script step to enter find mode in the first place so it modifies the data in the current record instead of entering criteria for performing a find.
I see many, many steps that are preceded with // which means that they are currently disabled and thus are skipped when the script is run. One of those disabled steps would have entered find mode and then paused the script so that the user could enter additional find criteria.
Either this script was deliberately sabotaged by your former developer or it is a work in progress that is in a very messy condition.
One piece of good news is that you have FileMaker advanced. You can select the script debugger from the tools menu and then run a script, using the debugger controls and the data viewer to watch how the script works one step at a time. This can be a very handy way to learn what a script is or isn't doing.
Thank you, I am looking up on how to use the script debugger now.
Thank you, I found the two lines and dissabled them and it works. Thank you PhilModJunk!