Jump to content

Embarrassingly simple question


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

Recommended Posts

  • Newbies

I’m trying to clear a field every time I run a script. I’m using "set field [field name = 0]" when I do this. However every other time I run the script, it returns a 1. Why is this?

I checked the other areas of my script and I even put together a simple test script. Still, every other run gives me a 1. Any ideas?

Link to comment
Share on other sites

The Set Field[] step has two distinct options:

- target field (which field to set)

- calculated result (what value to set the field to)

Select the step and look at the bottom of the Edit Script window to see those options.

It seems you are setting your field to the calculated result of:

Yourfield = 0

This is a valid expression that evaluates either as true (1) or false (0). The first time you run your script, there is some value in the field, so the expression returns false, and the field is set to 0. The next run, the expression is true, so the field is set to 1. Each succesive run toggles between 0 and 1.

To really clear the field, make the calculated result just plain 0 or "".

Link to comment
Share on other sites

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