Hi Leif,
As you mentioned, the order of actions usually doesn't matter because they have different triggers. When two actions have the same trigger, it's their placement that detemines the order (
top to bottom first, then left to right),
and the number next to the "when" will tell you which one comes first. So in image1 below, it is in the correct order, but in image2, with the "first" action slightly lower than the "second", it's going to check before it sets the value, so that's probably not what is desired.
Note, that you can usually combine these two functions into a single action (shown in image3).
If you're trying to coordinate actions between a Master and a regular page, and each have an onPageLoad, things get a little trickier, because it's a bit of a toss up as to which will load in first. There are some other techniques that you can use if that's the case (Global Events).
Hope that helps!