Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
So there's a fair amount of these questions out there already with no answers, but figured maybe it's worth asking again...
I have a script that works like the following basic example:
Section Application;
if not IsPartialReload() then
//All my loads and joins can concatenates, etc.
//None of these need to be replaced/added during a partial reload.
end if;
//A bunch of set statements
set _var1 = 0;
set _var2 = 0;
set _var3 = 1;
set _var4 = 1;
The problem is that when I execute a partial reload, even though all the documentation I can find suggests that SET/LET statements are run, they are not being run. The variable values are never updated in the application upon completion of the partial reload.
What am I missing?
I would expect them to update. I am going to test now and get back
Seems to be working in the attached file. Would you be able to share a sample where you believe it isn't working?
can u ry giving single quotes to variables and try?
Thanks for the quick response. This is strange. The example definitely works. Which leads me to believe there is something between my "if" and "end if" that is breaking it somehow. I'm testing a couple of things and will report back. The script is rather long and not sure how much of it I can actually post.
Not sure if it matters, but can you try ENDIF; without any space?
Tried with quotes, and the endif without the space. Neither seemed to have an impact.
However, I removed the ";" after "end if" altogether and that fixed it. Any ideas on why that would have broken things?
Thanks for your help!
I have no idea, this is strange, but it is working for you, right?
try this
if IsPartialReload() then
//drop Table TABNAME;
ENDIF
I'll make that change. Thanks! One last thing, I understand the difference between SET and LET statements, but what is the difference when declaring a variable without a SET or LET like:
_var = 1;
HI
You can write load script so that the variables are only set when there is a full reload:
IF IsPartialReload() = 0 THEN //If it is NOT a partial reload
set Variable = whatever;
ENDIF