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

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

Recommended Posts

Posted

You could also script it. Use the [color:red]Set Field step to clear the necessary globals.

Posted

Re: closing the file, that's not really an option as I want to clear the globals and keep using the file.

I've ended up clearing all the global variables by hand in one script; this wasn't too difficult. Weird how FM doesn't have a script step to do this automatically.

Posted

No offense, but the weird part here is your request. The very purpose of global variables is to persist until the file is closed. If you don't want them to hang around, why make them global in the first place?

Posted

None taken! It is a bit of a weird request. I'm trying to get round some hacky bits of my project where I've used globals and not unset them properly.

Posted

The elegance is, elsewhere than the US to use as less $ due to trade deficits ...joke aside, though wide scoped measures as global fields as well as variables should be dosed virtuously which means with hesitation:

http://en.wikipedia.org/wiki/Global_variable

...so by nad large a bad habit!

--sd

Posted

I agree with Michael here regarding global variables. That being said, perhaps you may want to take a look at these custom functions and see if you may benefit from adapting their methods.

VariablesLog ( )

VariablesResetAll ( )

Posted (edited)

Can you explain why you need to clear these fields (or variables)?

[color:red]Additional.

Sorry, I didn't see your post where you state that you made errors in setting them.

These now sound like normal fields with Global Storage?

How many fields are involved?

Have you read the Manual or checked out the Online Help on Globals

Read about

The Replace Function

Loop Scripts

Set Field Script Step

Lee

Edited by Guest
Additional
Posted

Thanks Lee, and everyone else who commented.

I've now realised how and where to use Global variables in FM and will do so properly in my next project. For my current project (already beyond deadline) the custom functions will be really useful. I just need to clear everything down at certain points so that I know stray global variables aren't going to cause bugs.

Thanks once again!

This topic is 5697 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.