This content has been marked as final. Show 3 replies
I´ve got some scripts in one QVW and it`s necessary to reload the script parts at different times. The reason is very easy, the raw datas exits at different times, so I can`t reload everything at once.
At the moment I`ve solved this with variables, that`s a very easy solution. These variables were declared once and setting by button constantly. With an if clause in the script it`s possible to activate /deactivate some parts (eg. if $(vScriptVariable1) = 1 then [reload script part1…]… else [do nothing…] end if [and start with the next if $(vScriptVariable2) = 1). Actually there are about 20 script parts controlled with this solution.
But I`m not absolutely happy with this solution, because it`s possible to delete these variables and I have to declare again (regularly I delete all the variables especially to check correct initialization etc.). On the other hand I don`t like to declare these variable at every reload, because I`d like to know which script parts already done (shown by $( vScriptVariable1) ) = 1).
So, is there a way to check if a variable exists? (To be clear: I don’t need the value of the variable rather if the variable is declared!)
I´ve tried this with isnull($(vScriptVariable1)) nd with exists(($(vScriptVariable1)) but it doesn’t work.
The variable vTest in the example is just declared in order to show which case (Then or Else) is valid. Of course I´ve tried with a deleted vScriptVariable1 and a declared vScriptVariable1.