This section provides for a court or tribunal to remove, or limit any retrospective effect, or suspend any such effect, of a decision by it that an Act of the Scottish Parliament or a provision of it is ultra vires or that a member of the Scottish Executive did not have the power to make subordinate legislation that he has purported to make.
It also provides that one of the criteria the court or tribunal must take into account when determining whether to use this power is the extent to which third parties would otherwise be adversely affected.  The section also provides that if a court or tribunal is considering using this power it must in certain circumstances intimate that fact to the Lord Advocate and the appropriate law officer who may then become a party to the proceedings so far as they relate to the possible exercise of the power.
Commentary Part V: Miscellaneous and General Purpose and Effect