 Sir John was a Justice of the Peace for Haddingtonshire in 1683 and a Burgess of Edinburgh (2 November 1687).He was the Commissioner for Haddingtonshire in Parliament (1685–86, 1690-1707), and spoke several times against the Union.Lord Fountainhall left a large collection of legal opinions and papers, including some that record Court of Session proceedings from 1678 to 1712, which also note the transactions of the Privy Council of Scotland, and those of the Courts of Justiciary and Exchequer, works compiled with anecdotes of the times and much characteristic ingenuity of observation, to which professional lawyers still turn today.