Jump to content

Get(ActiveFieldName)


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

Recommended Posts

Do not understand Get(ActiveFieldName) usage:
Simple script:
     set variable $fieldname = Get(ActiveFieldName)
1. place cursor in desired field.
2. run script in debug mode, data viewer on
3. $firldname always null 
 
    set variable $fieldname = Get(ActiveFieldName)
    set field (xyz) = $fieldname
1. place cursor in desired field
2. run script
3. field (xyz; text) is empty
 
What am I doing wrong?
Same problem with Get(ActiveFieldContent)
Other Get(Active***) all appear to work as I would expect.
Link to comment
Share on other sites

Where is your actual script? How are you triggering the script?

Can you show us your file or a simple example file?

There will need to be a second step in the script so you can stop in debugger and look at the variable contents before the script ends.

Since you are using a script variable ( single $ variable) it will always be empty after the script runs.

While this is something you should be able to do successfully - in real life, what do you want to do with $fieldName?

 

  • Thanks 1
Link to comment
Share on other sites

Thanks for the response BruceR and sorry for the 4PM shout out. As you suspected, I was maligning the  script step by stepping out of the layout and back before executing the step. Brain was running in standard knucklehead mode.

Moved get(active....) in front of unrelated  layout in/out housekeeping and it functions as expected. Once again, thanks for the advice.

Link to comment
Share on other sites

This topic is 1619 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
 Share

×
×
  • Create New...

Important Information

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