
119 Pa. Commonwealth Ct. 477 (1988)
547 A.2d 830
Charles H. Jost, Appellant
v.
Phoenixville Area School District, Appellee.
No. 1002 C.D. 1987.
Commonwealth Court of Pennsylvania.
Argued June 13, 1988.
September 16, 1988.
*478 Argued June 13, 1988, before Judge MacPHAIL, and Senior Judges BARBIERI and KALISH, sitting as a panel of three.
John D. Killian, Killian & Gephart, for appellant.
Elliott D. Goldberg, Goldberg & Ramsay, P.C., for appellee.
OPINION BY SENIOR JUDGE KALISH, September 16, 1988:
Charles H. Jost (Appellant) appeals from an order of the Court of Common Pleas of Chester County (trial court) affirming a decision of the Phoenixville Area *479 School Board (Board) terminating Appellant's employment with the Phoenixville Area School District (District). We affirm.
Appellant was hired by the East Pikeland School District in 1958. In 1966, East Pikeland and two other school districts were incorporated into the District. Appellant's employment continued with the District; he was assigned as principal of the East Pikeland Elementary School. Appellant held this position until January 1970 when he was assigned to the position of administrative assistant to the superintendent.[1] Appellant held this position until June 30, 1977 when the Board, because of a substantial decrease in student enrollment and severe financial problems, abolished the position and terminated Appellant's employment.
Appellant was informed of the impending abolition of the position and his termination by letter dated April 18, 1977. Appellant requested a Board hearing, contending that his employment with the District could not be terminated because he was a professional employee entitled to the protection of the Public School Code of 1949 (School Code).[2] Appellant did not dispute that the position of administrative assistant to the superintendent was a nonprofessional position and that an employee in that position was not entitled to the protections of the School Code but argued that he had been illegally demoted when he had been permanently *480 reassigned to this position in 1970 and therefore he was still a professional employee. A hearing was held July 13, 1977 and the Board issued its decision on September 15, 1977. The Board determined that Appellant had consented to his transfer to the nonprofessional position and was properly terminated.
Appellant filed a timely appeal of the Board's decision with the trial court but sought an extension of time for action on the appeal pending resolution of related litigation, instituted by Appellant in 1972 (1972 Action), which Appellant felt might resolve the issues in the appeal. The extension was granted. The 1972 Action was finally resolved in 1982.
In 1984 Appellant, believing the resolution of the 1972 Action did not resolve the issue of whether he had been illegally demoted to a nonprofessional position, moved to have action taken on the appeal. Oral argument was heard before the trial court on December 23, 1986. The trial court concluded that Appellant had waived his right to challenge his reassignment to the nonprofessional position by bringing the 1972 Action against the District in which Appellant sought only money damages for an illegal demotion. The trial court affirmed the propriety of the Board's 1977 termination of Appellant's employment with the Board.
On appeal to this court, Appellant continues to assert that he was illegally demoted in 1972 from his position as principal and contends that the trial court erred in determining that he waived his right to challenge his assignment to a nonprofessional position by electing to pursue only money damages in the 1972 Action. For the reasons which follow, we conclude that the 1972 Action is res judicata to the instant proceeding.


*481 1972 ACTION
It is necessary in order to understand this case to briefly detail the history of the 1972 Action. There have been two superior court cases involving the 1972 Action which contain the relevant information. They are Jost v. Phoenixville Area School District (Jost I), 237 Pa. Superior Ct. 153, 346 A.2d 333 (1975), and Jost v. Phoenixville Area School District (Jost II), 267 Pa. Superior Ct. 461, 406 A.2d 1133 (1979). Jost I informs us that Appellant instituted an assumpsit suit for loss of salary against the District in 1972. The District, while entering an appearance, never filed an answer and a default judgment was entered on February 13, 1973. The District sought to open the judgment which the trial court permitted. The superior court in Jost I reversed that decision. A jury trial was then held to determine the amount of damages and a judgment in the amount of $73,161 was entered. The District appealed from this judgment. The superior court reversed and remanded for a new damages trial in Jost II.[3]
The Jost II opinion provides the information concerning the 1972 Action necessary for the resolution of this case. The Superior Court in Jost II set forth Appellant's allegations as to the actions taken by the District with respect to Appellant's salary and position from 1966 through 1972[4] and summarized Appellant's complaint as follows:

*482 These actions were arbitrary and capricious, and constituted a demotion of [Jost] in both salary and type of position contrary to the provision of the Public School Code Act of 1949, Act of March 10, 1949, P.L. 30, as amended, 24 P.S. §§11-1150, 1151, and contrary to the due process and equal protection clauses of the United Stated [sic] Constitution. As a result, [Jost] has lost $30,775 in expected salary increases, and has been denied the professional and personal status and reputation he would have otherwise enjoyed.
Id. at 465, 406 A.2d at 1135 (emphasis added). The Superior Court concluded that Appellant's complaint stated a cause of action under section 1151 of the School Code[5] for an illegal demotion, which, by failing to answer, the District had admitted. The Superior Court held that Appellant was limited to seeking the statutory remedies provided by the School Code for illegal demotion, which were reinstatement and back pay,[6] and could not claim damages for loss of reputation. Appellant's complaint sought only money damages. The Superior Court remanded for the trial court to "require [Jost] *483 to prove the position and salary level he would have enjoyed had he not been demoted so that his salary losses may be determined." Id. at 468, 406 A.2d at 1136. The trial court in Jost v. Phoenixville Area School District (Jost III) (No. 129 June Term 1972, filed September 29, 1982) ordered the District to pay Appellant $14,559.27 in back pay and interest. No appeal was taken from this decision.

RES JUDICATA
The doctrine of res judicata will bar a proceeding if four conditions are met: (1) identity of the thing sued for; (2) identity of the cause of action; (3) identity of the parties; and (4) identity of the capacity of the parties suing or being sued. Kurtz v. Workmen's Compensation Appeal Board (Allied Chemical Corp.), 95 Pa. Commonwealth Ct. 110, 504 A.2d 428 (1986). Appellant contends that the cause of action in this proceeding is different from that of the 1972 Action. He decribes the 1972 Action as a challenge to a salary demotion beginning in 1966 and describes the current proceeding as a challenge to a position demotion occurring in 1970.
This court laid the ground rules for determining when causes of action are identical for the purpose of applying the doctrine of res judicata in McCarthy v. Township of McCandless, 7 Pa. Commonwealth Ct. 611, 300 A.2d 815 (1973). The court described the task as follows:
It is impossible to lay down an all-inclusive and satisfying formula to determine whether or not `causes of action' are identical. The cases do perhaps warrant a definition to this extent: for purposes of res judicata, there is identity of causes of action when in both the old and new proceedings the subject matter and the ultimate issues are the same. Beyond this, determination of the *484 question must rest in the sound discretion of the courts as applied to the circumstances of each case, having proper regard both to the public policy of res judicata and to the rights of the parties to have every bona fide issue passed upon.
Id. at 617-18, 300 A.2d at 820 (footnote omitted, emphasis in original).
The subject matter in the current proceeding is Appellant's reassignment from professional position of principal to the nonprofessional position of administrative assistant and the ultimate issue is whether the change was an illegal demotion. As can be seen from the previous discussion of the 1972 Action, the subject matter there was the change in Appellant's salary and position and the ultimate issue was whether the salary and position changes were demotions. Clearly the cause of action in the 1972 Action subsumes that in this case and must be considered identical for purposes of res judicata.
We note that the relief sought by Appellant in the instant proceeding, recognition that he remained a professional employee at the time of his termination in 1977, is different than that which he sought in the 1972 Action. However, as previously pointed out, an illegally demoted employee is entitled under the School Code to reinstatement to his prior position and to back pay. Appellant in the 1972 Action sought only back pay. He could have sought reinstatement to the principal position at that time.[7] A judgment is res judicata not only as to damages actually claimed but also as to those which could have been sought. Daniels v. State Farm Mutual *485 Automobile Insurance, Co., 305 Pa. Superior Ct. 352, 451 A.2d 684 (1982).
Accordingly, we affirm.

ORDER
AND NOW, September 16, 1988, the order of the Court of Common Pleas of Chester County in the above-captioned case is affirmed.
NOTES
[1]  Appellant was initially assigned to this position in August 1969 but performed the duties of principal of East Pikeland Elementary School from September through December 1969.
[2]  Act of March 10, 1949, P.L. 30, 24 P.S. §§1-101 to 26-2606. Section 1124 of the School Code permits suspension, but not termination, of professional employees when there has been a decline in student enrollment, 24 P.S. §11-1124, and section 1125 of the School Code detailed the procedure by which suspension could be accomplished. 24 P.S. §11-1125. Section 1125 was repealed in 1979 and replaced with section 1125.1.
[3]  The Superior Court recognized that proper jurisdiction of the appeal was with this court but because neither party objected and because of its past involvement with the case, the court chose to decide it. Jost II, 267 Pa. Superior Ct. at 465 n.1, 406 A.2d at 1135 n.1.
[4]  We note that Appellant's salary was never decreased in total amount but rather his contract was lengthened to 12 months from the 10½ months it had been at the time of the District's formation. He also claimed demotion because his salary was not increased and/or increased as much as others with similar qualifications and experience. The only position change experienced by Appellant was from principal to administrative assistant in 1970.
[5]  24 P.S. §11-1151. This section provides, in pertinent part:

[T]here shall be no demotion of any professional employe either in salary or type of position, except as otherwise provided in this act, without the consent of the employe, or, if such consent is not received, then such demotion shall be subject to the right to a hearing before the board of school directors and an appeal in the same manner as herein before provided in the case of the dismissal of a professional employee.
[6]  See Black v. Wyalusing Area School District, 27 Pa. Commonwealth Ct. 176, 365 A.2d 1352 (1976).
[7]  Appellant should have originally pursued his statutory remedies through the administrative process set forth in the School Code. See Jackson v. Centennial School District, 509 Pa. 101, 501 A.2d 218 (1985). However, Appellant's failure to exhaust his administrative remedies was never raised in the 1972 Action.
