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

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

Recommended Posts

Posted (edited)
45 minutes ago, comment said:

It is working, provided you run one of the other scripts first. Otherwise the variable is still empty.

Means we need to set 

set variable [ $$time ; value; get(current time) ]

before window title ????

 

Screenshot 2019-01-29 at 19.02.27.png

 

why its not working by dragging the data from global variables script ????

 

 

Screenshot 2019-01-29 at 19.03.16.png

Screenshot 2019-01-29 at 19.03.21.png

Edited by Dr.Gopala krishnam raju AMBATI
Posted

It means that you need to execute the script step:

Set Variable [ $$date; Value:Get ( CurrentDate ) ]

before you try executing:

Set Window Title [ Current Window; New Title: $$date ]

It doesn't matter if the Set Variable[] step is in the same script or not. The variable being set is global, so it will remain in scope until the end of the current session. The only thing that matters is that the step is performed. Otherwise the variable does not exist, and you are setting the window title to an empty string.

Posted
11 minutes ago, comment said:

The only thing that matters is that the step is performed. Otherwise the variable does not exist, and you are setting the window title to an empty string.

1

Now got the point - we need to execute global variable step so it stays till the file is open  whether its in that or other script , once executed we can manipulate with our own script steps 

Posted

Many developers use a script that runs on opening the file to populate some global variables. You'd probably not want to do this with current date or time, but it is convenient for values stored as preferences that need to be accessible from any context.

  • Like 2
Posted
6 minutes ago, comment said:

Many developers use a script that runs on opening the file to populate some global variables. You'd probably not want to do this with current date or time, but it is convenient for values stored as preferences that need to be accessible from any context.

since 2010 I'm using FM but never used any global variable in my solution, today wanted to test global var to see  how it works read a lot of data practically but I understood just now 

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