2 Samuel 7:21
For thy word’s sake, and according to thine own heart, hast thou done all these great things, to make thy servant know them. For thy word’s sake, and according to thine own heart, hast thou done all these great things, to make thy servant know them.
David poured out this prayer in grateful response after God promised to establish his house, his descendants, and Israel in lasting security. The promise came even as God set aside David's own cherished plan to build the temple himself. David therefore traced all the great things done for him not to his own worth but to God's word and to God's own heart and purpose. It was for the sake of that word and according to that inner purpose that God had acted and had made His servant know what He had done.