One day when Baba Ram Rai and (Guru) Harkrishan were sitting in trance, a Sikh came and praising them said, 'How the princes are engrossed in deep meditation! They have forgotten all worldly attachments and now have dyed themselves in the Name of God.'
The Guru called for the Sikh and said, 'If you want the real situation of the princes then I give you this needle. Prick with this needle the hand of each prince and you will find who has been engrossed in deep meditation and who has been sitting just closing his eyes.'
That Sikh took the needle and he pricked the hand of Baba Ram Rai. Even on just touching the needle, Baba Ram Rai became alert and he glared towards the Sikh angrily.
Then he pricked the hand of (Guru) Harkrishan. But he did not move. He again pricked but (Guru) Harkrishan again remained motionless.
The Sikh was astonished to see a small boy in such a state of trance.
Guru Har Rai was watching the whole show.
From this he perceived that Baba Ram Rai was just closing his eyes and was aware of everything happening outside.
But (Guru) Harkrishan had gone in trance and was completely unaware of the surroundings.
From this evaluation, the Guru concluded that Baba Ram Rai was not serious towards the recitation of the Name of god.
He had two appearances. In his heart there was no love for God, but outwardly he was showing others that he was very much devoted to God.
On another appraisal, Baba Ram Rai failed to impress the Guru.
One day a Sikh came and asked the Guru that among his sons which were dearer to him.
The Guru replied, 'Parents love their children equally, for me even my Sikhs are my children and they are dearer to me. But as far my sons are concerned if you want to assess that who is more lovable then I tell you one method of estimation. I hand over you this needle. My both sons are reciting the holy hymns sitting in their cradles. First you should listen the devotional songs recited by the princes. After that you should pierced this needle into one pier of the cradle. In whose cradle's pier this needle pierces easily consider threat my loving son.'
Obeying the orders of Guru, the Sikh reached near the cradle of Baba Ram Rai. He stayed there and heard the recitation of holy humns. Baba Ram Rai was reciting the Gurbani by placing the holy book on the cradle.
After hearing the devotional songs for sometime the Sikh tried to pierce the needle into the pier of the cradle. But the wood was so hard that it could not even prick it. He tried very hard but all in vain.
Then he went near the cradle of (Guru) Harkrishan. He was reciting hymns in a very sweet voice. The Sikh was mesmerized to hear the sweet voice of (Guru) Harkrishan and he stayed there for a long time to enjoy the celestial bliss. He even forgot for what prupose he had gone there.
When Guru called for him he remembered his task. Then he tried to pierce the needle into one pier of the cradle. He was astonished to see that the needle pierced into the wooden pier as if it was made of wax.
When he touched the pier with his hand he found that wood had turned green as if it was a branch of a new grown tree. Then he met Guru Har Rai ji and told him the whole story.
He said, 'My Lord! I have not seen such miracle in my life. The hard wood has turned into wax. The cradle seems to be made of plant of Banana. Dry wood has been converted into cradle of wax. How this all has come about?'
The Guru was very pleased to hear his words. He said, 'It has happened due to recitation of holy hymns. When a person recites the ‘Gurbani' from the core of his heart, then the dry plants turn into green plants. The Child Harkrishan has been reciting the hymns sitting in the lap of God. He has been so much engrossed in the Name of God that he has forgotten about his surroundings. Now he and God have become one. That is why, the dry wood have changed into a green tree. But Baba Ram Rai has been reciting the hymns in order to perform a routine discipline. He has not been concentrating on the Name of God. He is merely obliging decorum. So his recitation of Gurbani has no affect on the wood. Now I hope that you may have got the answer of your question.'
Keeping in view these two appraisals Guru Har rai made up his mind to ordain Sri Harkrishan as the next Guru.
But when Baba Ram Rai changed the hymns of Guru Nanak, he at once sent messages to his Sikhs to reach Kiratpur. A large congregation gathered there. He announced that he was going to leave this mortal world soon, so he had decided to offer the Guruship to Sri Harkrishan.
When the congregation heard this news they felt very grieved. They were worried about the early departure of the Guru. He was at that time not more than thirty one years old. He was very young and Sri Harkrishan was mere five years old.
He addressed the congregation and said, 'In this world whoever comes, have to leave it. Now Sri Harkrishan will be your Divine Master. Though he is still a child but he is competent to lead the Sikhs. Now you should consider him as my form.'
Then he got up from the throne and got Sri Harkrishan seated there. Then he encircled the throne three times and bowed before Guru Harkrishan.
Then he asked grandson of Baba Budha to complete the tradition of transformation of Guruship.
Bhai Gurditta placed five paisa and a coconut before the Guru Harkrishan and completed the ceremony of applying the colored mark on the forehead.
Then he bowed before the new Guru. After that the congregation bowed before him turn by turn.
So Guru Harkrishan was installed as the Eight Guru.