The participants' codes are referred to by placing a randomly generated 4 digit number after the initial of their last names e.g. J3926 for last name John.
I am not sure how does "be referred to by" works. This is a sentence I wrote based on the structure of a sentence I am trying to understand. And I wonder the sentence I wrote above makes sense.
(Please understand: I am not in liberty to write the exact sentence online; Basically I only changed the subject and object, the structure hasn't been changed.)