Dr.Gopala krishnam raju AMBATI Posted January 29, 2019 Posted January 29, 2019 I made global variable and made 2 scripts n1 and n2 n1 is working n2 not someone plz explain wats happening ???? plz FM GLOBALS.fmp12
comment Posted January 29, 2019 Posted January 29, 2019 It is working, provided you run one of the other scripts first. Otherwise the variable is still empty.
Dr.Gopala krishnam raju AMBATI Posted January 29, 2019 Author Posted January 29, 2019 (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 ???? why its not working by dragging the data from global variables script ???? Edited January 29, 2019 by Dr.Gopala krishnam raju AMBATI
comment Posted January 29, 2019 Posted January 29, 2019 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.
Dr.Gopala krishnam raju AMBATI Posted January 29, 2019 Author Posted January 29, 2019 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
comment Posted January 29, 2019 Posted January 29, 2019 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. 2
Dr.Gopala krishnam raju AMBATI Posted January 29, 2019 Author Posted January 29, 2019 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now