Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set vs Let in script. What gets loaded during Partial Reload?

Greetings,

I am doing some thinking out loud to see if anyone else has experienced this.

I am curious on what gets executed during a partial reload.   I added a new QVD for some benchmark data to import to my current QVW.  I just wanted to load this data, so I did an ADD Load and used Partial Reload to import it to my data tables.

It seems that the SET statements in my load script were executed, but the LET statements were not or they did not give me the right results as they were dependent on other load statements.  That kind of makes sense, but I would like some clarification of what actually gets executed on a partial reload.   I know that it is any load statement with ADD or Replace in front of it, but what else does or does not get loaded.

My LET statements are important as the results of them are used in calculations in objects. It would seem that would be an important consideration to know ahead of time, so I don't accidentally put my end users in a bind.

In my case, the LET values are now null, since they did not get executed properly as part of the loads that were not executed on the partial reload.

Who has some feedback for me today?

1 Solution

Accepted Solutions
MayilVahanan

HI

I think, In your Let statement, you are referring some table or field statement which is not load in the partial reload.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

9 Replies
sunny_talwar

In my experience I have seen both LET and SET are executed on Partial Reload. Like you said the issue could be related to tables which are used in the LET which are not getting executed during Partial Reload.

MayilVahanan

HI

I think, In your Let statement, you are referring some table or field statement which is not load in the partial reload.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
swuehl
MVP
MVP

I believe both statements get executed.

And this is what you've observed, since the value changed on (partial) reload, right?

If you think they are not giving right results, you would need to specify how the statements were defined and what you expect as result (and all the preconditions needed to evaluate the statement).

If you want, you can upload your relevant part of the script to the forum.

Anonymous
Not applicable
Author

Thanks for your feedback.   I agree with both of you.  I use LET statements in my calendar table that are not executed when I do a partial reload.  It would seem that a partial reload should only be used in development and testing rather than any production situation. 

MayilVahanan

Hi

Its use any production situation. But In your case,  you need to reload all tables in order to reflect the values in variables.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author

That kind of defeats the purpose of the partial reload.  If I have to reload my calendar table, than pretty much affects all of my tables with date ranges.

Thanks for all of the quick responses.  I got the information I needed to know.

swuehl
MVP
MVP

I think you just need to put your LET statements in a block like


IF IsPartialReload( ) THEN

    TRACE Partial;

    LET vVar = ....;

ENDIF

IsPartialReload( )

Returns - 1 (true) if the current reload is partial, otherwise 0 (false).


edit: or using NOT isPartialReload() in your case

Anonymous
Not applicable
Author

In this case, it would ignore the LET statement on partial reload and retain the last known data?

So would it be your recommendation to use this logic around all LET statements in my script?

Would you consider that a best practice for developers to follow?

swuehl
MVP
MVP

Well, I was just suggesting a script function that allows you to build up a logic in your script to consider running in a partial or full reload.

Without knowing your details, I am not recommending anything.