Felt, P. J.
Appellee brought this action against appellants, the Chicago, South Bend and Northern Indiana Railway Company and the Northern Indiana Railway Company, to recover money alleged to be due him. The complaint is in five paragraphs. The first is in the form of • a common count for money had and received. The remaining paragraphs are substantially alike and in substance are as follows : The Northern Indiana Railway Company was a corporation duly organized under the laws of Indiana, and owned and operated street and interurban railways in Indiana. The Chicago, South Bend and Northern Indiana Railway Company is also a similar corporation engaged, in like business. On February 6, 1906, in the St. Joseph Circuit Court, appellee recovered a judgment against one Diliworth, a nonresident of the State, for $3,873.41, and also against the Northern Indiana Railway Company .as garnishee defendant. It was found and adjudged that the railway company owed Dillworth a certain nonnegotiable note due February 15, 1906, in a sum in excess of appellee’s judgment against Dillworth, and that other garnishee defendants were sureties of the railway company on said note. The railway company was ordered to pay appellee’s judgment in the sum of $3,873.41 when the aforesaid note became due and to pay the balance due on the note to the City' National Bank of South Bend for the use and benefit of the owner of said note.
Between the date of the judgment and February 15, *2401906, when the note became due, certain rumors and suggestions came to the Northern Indiana Railway Company that the aforesaid note might possibly have been assigned and that the Lincoln National Bank of Pittsburg, Pennsylvania, claimed some right, title or interest in the note and might make demand upon the company for payment uf the same and bring suit for the collection thereof. On February 15, 1906, said railway company, through its vice president and general manager and treasurer, informed appellee of such rumors and suggestions and that it was desirous of complying with the order of the court, but would demand indemnity and protection from any liability to the Lincoln National Bank, and likewise demanded indemnity and protection from any costs and expenses of litigation that might arise from a suit by that bank. Whereupon appellee and said company entered into the following parol agreement, to wit:
“That in consideration of the payment of said judgment at this time, this plaintiff would indemnify and save harmless the said defendant railway company from any further or additional payment growing out of any claim of ownership or right, title or interest in said note of said Lincoln National Bank; that said plaintiff further agreed to defend all actions or suits at law which might arise upon said claim of the Lincoln National Bank; that this plaintiff further agreed to pay all expenses of any litigation which might arise from said claim, of said Lincoln National Bank, and to defend any suit or suits so brought at his own expense; that for the purpose of indemnifying said Northern Indiana Railway Company against said alleged claim of said Lincoln National Bank, it was agreed that the funds and moneys paid upon said judgment should be delivered back to said defendant, Northern Indiana Railway Company and be retained by it as a protection against any claim or suit brought against said defendant by the said Lincoln National Bank, and growing out of said note, which said money, so long as it remained in' the hands of said defendant railway company, was to bear interest in favor of this plaintiff at the rate of six per cent per annum, and which said *241money and funds were to be delivered over to this plaintiff, together with interest thereon, upon the termination or settlement of any suit to be brought by the said Lincoln National Bank.”
In compliance with said agreement, on February 15, 1906, the railway company issued its check (No. 5624) in the amount of $3,873.41, drawn on the Citizens National Bank of South Bend, Indiana, in favor of the clerk of the St. Joseph Circuit Court, which check was delivered and accepted by the clerk in payment of said judgment and afterwards endorsed by him to appellee, who immediately endorsed and delivered it back to the Northern Indiana Railway Company to be held as indemnity as above stated. Appellee then released the judgment against said company upon the record. Thereafter the Lincoln National Bank brought suit in the St. Joseph Circuit Court against the Northern Indiana Railway Company for the collection of said note. The claim was litigated, an appeal taken, and thereafter again litigated in said circuit court. On April 2, 1913, the Lincoln National Bank abandoned its alleged claim to said note and dismissed its suit against said company, and the suit finally ended without loss, expense or damage to said company. Pursuant to his agreement, appellee, with the knowledge and consent of said company, employed attorneys to defend the suit, and paid all expenses of such litigation; he and the attorneys so employed consulted frequently with the officers and agents of the Chicago, South Bend and Northern Indiana Railway Company, which company succeeded to the rights, properties, debts and liabilities of the Northern Indiana Railway Company. On January 26, 1907, appellant, Chicago, South Bend and Northern Indiana Railway Company, was incorporated under the laws of this state for street railway purposes and particularly for the'purpose of taking over all the stock, assets and property, and succeeding to all the rights, duties and liabilities of the Northern Indiana Railway Company. *242At the time of taking over such properties the suit of the Lincoln National Bank against the Northern Indiana Railway Company was pending in the St. Joseph Circuit Court. It is alleged that appellee fully performed his said agreement with the railway company and made demand for payment of the money due him before instituting this suit, and payment was refused. Separate demurrers by each of the appellants to each paragraph of the complaint were overruled. Each of the appellants answered by general denial. The Chicago, South Bend and Northern Indiana Railway Company also filed four paragraphs of special answers, the- substance of which is that appellee was not the real party in interest; that prior to the beginning of the suit he had sold, assigned and transferred his alleged claim and demand sued upon to Calvert H. DeFrees, Edward A. Morse and Gabriel R. Summers. The Chicago, South Bend and Northern Indiana Railway Company also filed a cross-complaint and sought to bring in new parties. Appellee moved to strike out the cross-complaint and his motion was sustained. The appellants have assigned separate errors and each has filed a separate brief.
1. The only error assigned and not waived by the Northern Indiana Railway Company is the overruling of its demurrer to each paragraph of the complaint. ' The only error assigned and not waived by the Chicago, South Bend and Northern Indiana Railway Company is the striking out of its cross-complaint. The Northern Indiana Railway Company presents and urges two points to sustain its contention that the court erred in overruling its demurrer to each paragraph of the complaint: (1) Each paragraph, except the first, shows that the judgment referred to was not paid. The action, if any, should have been upon the judgment. (2) Neither paragraph of plaintiff’s complaint sets forth a copy of the check referred to in the complaint. The first paragraph is clearly for money had and received. The other paragraphs allege the facts and circumstances under *243which the money was received by the Northern Indiana Railway Company and by which the Chicago, South Bend and Northern Indiana Railway Company became liable to appellee therefor. Neither paragraph is based upon the judgment, but each shows that the judgment had been paid and satisfied and the money immediately placed in the keeping of the Railway Company as an indemnity; that the purpose of such indemnity had been accomplished and appellee was entitled to the money, had demanded the same, and payment had been refused. Each of the paragraphs of complaint is good as against both the appellants for the recovery of the money placed in the keeping of the Northern Indiana Railway Company under the conditions alleged. Neither paragraph seeks to recover on the cheek and there was no occasion for setting forth a copy of it with the complaint. The court did not err in overruling the demurrer to the complaint
The cross-complaint is very long, goes into the history of the original suit in garnishment, the sale and transfer of the property of the Northern Indiana Railway Company, and the arrangement and conditions under which the transfer was accomplished. It is against appellee and Northern Indiana Railway Company and the following additional parties, viz.: William L. Taylor, Arthur Kennedy, The Federal Union Surety Company, The Western Indemnity Company, the Citizens National Bank of South Bend, Calvert H. DeFrees, Charles Dietrich, Gabriel R. Summers, Edward A. Morse, Samuel T. Murdock, Charles M. Murdock and Mary Murdock Cory. The pleading shows that Arthur Kennedy, party of the first part, and Charles F. Dietrich and James Murdock entered into the original contract by which the Northern Indiana Railway Company sold and transferred its property, and the parties to the contract other than James Murdock, who has since deceased, are made parties to the cross-complaint because of their relation to that transaction. The descendants of James Mur*244dock are likewise made parties for the same, reason. A bond was given to guarantee the purchasers against liens and claims not assumed by the purchasers and the surety companies are made parties to determine their liability, if any, should appellee’s claim be adjudged valid. Certain of the defendants are alleged to have indemnified the surety company. Others are alleged to have been stockholders in the selling company and to have wrongfully distributed to themselves large sums of the purchase money that should have been held for the payment of unsatisfied claims. It is also averred that at the time of the purchase by said railway company the records were examined and appellee’s judgment against the Northern Indiana Railway Company was found to be duly satisfied upon the record and the transfer of the property was thereafter made in reliance thereon and in the belief that the same was a full satisfaction of any claim due appellee and the purchasers had no knowledge or notice to the contrary. The cross-complaint also repeats the averment relating to the claim and suit of the Lincoln National Bank and the arrangement of appellee to indemnify the Northern Indiana Railway Company against loss on account thereof. It is also averred that after appellee filed this suit Calvert H. DePrees, Edward A. Morse and G-abriel R. Summers, each served upon cross-complainant written notices to the effect that appellee, in 1913, had duly assigned to each of said parties the judgment previously rendered in his favor for $3,873.41; that the judgment was unpaid and they intended to enforce collection thereof against cross-complainant; that the Citizens National Bank of South Bend also, notified cross-complainant that it was the owner of the note upon which said judgment in garnishment was rendered against the Northern Indiana Railway Company and intended to enforce its collection. It is also averred that said Chicago, South Bend and Northern Indiana Railway Company cannot safely go to trial upon the complaint of appellee, which *245proceeds upon the theory that said former judgment had been paid and satisfied, without the hazard of being liable to said Morse, Summers and DePrees, each of whom claims to be the equitable owner of said judgment and that the same has not been paid or discharged; that the trial between appellee and cross-complainant of the issues joined on the complaint cannot determine the question whether as between appellee and said alleged assignees of the judgment, it was in fact discharged and likewise as to the claim of the Citizens National Bank; that cross-complainant, unless permitted to adjudicate all said claims and demands in this suit, will be compelled to do so in separate suits if the claimants persist in their threats and demands. Cross-complainant also avers facts on which it denies the validity of some of said claims, and asks that they be tried and adjudicated; also that as to some of the claims it is not advised as to whether appellee or the claimants are right in their contentions-; that “to avoid circuity of actions and to prevent multiplicity of suits and to settle for once and all the complex questions involved * * * a court of equity should assume jurisdiction and require all of said cross-defendants to be made parties hereto * * * and be required to appear and to plead in this cause” their several claims and demands. The pleading concludes with a detailed statement of the relief prayed against the several parties asked to be made defendants thereto.
Appellant insists that the court erred in sustaining the motion to strike out the cross-complaint. Appellee contends that the matter set up in such pleading is not germane to the questions at issue on his complaint; that the facts averred, which are in any way related to the subject-matter of the transactions in issue were also in issue on the complaint and answers, and the ruling of the court in striking out the pleading, if wrong, was a harmless error for which the judgment should not be reversed.
*2462. 3. *245The correctness of the ruling of the trial court in sus*246taining the motion to strike out the cross-complaint does not depend upon the sufficiency of the pleading to state a cause of action against the defendants named therein, since that question can only be raised and duly presented by a demurrer for insufficiency of the facts alleged. Moorhouse v. Kunkalman (1911), 177 Ind. 471, 481, 96 N. E. 600; Toledo, etc., Traction Co. v. Toledo, etc., R. Co. (1908), 171 Ind. 213, 223, 86 N. E. 54; Guthrie v. Howland (1904), 164 Ind. 214, 221, 73 N. E. 259. A motion to strike out a pleading ordinarily reaches formal defects only. If the averments tend to state a cause of action or a defense, though the pleading may be insufficient in substance when duly tested by demurrer, it should not be stricken out; for the party has the right to amend after a demurrer is sustained, and this right is cut off when the pleading is struck out.
4. 5. If, however, the facts averred in a pleading are so palpably irrelevant to the matter in controversy that the pleading could not, by amendment, be made germane to the controversy it would not be error to strike it out; likewise where it clearly appears that the pleading against which the motion is directed is a sham pleading. Guthrie v. Howland, supra, p. 225; Hart v. Scott (1907), 168 Ind. 530, 532, 81 N. E. 481; Chicago, etc., R. Co. v. Summers (1887), 113 Ind. 10, 16, 14 N. E. 733, 3 Am. St. 616; Clark v. Jeffersonville, etc., R. Co. (1873), 44 Ind. 248, 263; McCoy v. Stockman (1896), 146 Ind. 668, 46 N. E. 21.
6. While not passing on the sufficiency of the cross-complaint, we think the facts averred tend to state a cause of action against some of the defendants thereto and are germane to the subject-matter of the transaction in controversy. The affirmative answers to the complaint aver that appellee is not the real party in interest, and that he had assigned and transferred his claim against the railway company before beginning this suit. The find*247ings and the judgment settle the question adversely to appellants and in favor of appellee, but the question is not determined as to persons not parties to the suit.
The assignment of the judgment by appellee to other parties, long after he had placed upon the record a satisfaction thereof, is open to the inference that, notwithstanding such satisfaction, he still claimed to own or have some assignable interest in the judgment. The judgment rendered in this suit does not bar such assignees from an effort to enforce the collection of the judgment. The cross-complaint tendered this issue against such assignees and also tendered other alleged issues. Some of them may not be germane to the subject 'of the legal controversy growing out of appellee’s demand, but the fact remains that appellee’s demand in this suit is based upon the fact that he satisfied and released a valid judgment upon receipt of the amount due thereon and thereupon placed the money in the keeping of the judgment defendant until he met certain conditions which in this suit he claims to have satisfied, and is therefore entitled to his money, not on the original judgment, but from the fact that the party who received it from him, now wrongfully refuses to pay it to him. The money due represents the same original claim. If in fact he had sold and transferred the judgment, and in that way obtained payment of his original claim, he is not in equity entitled to receive it again. If that judgment may be enforced against appellants or if there is reasonable ground to assert that they may be called upon to resist its collection as alleged in the cross-complaint, then the controversy should have been ended in this suit, in all its phases, as to all possible parties to the transaction or controversy, to avoid a multiplicity of suits and to reach and satisfy the ends of justice as to all who assert, or are likely to claim, some interest in the subject-matter of the transactions involved in the suit.
It is the policy of the law to avoid multiplicity of suits. *248The relief demanded by the cross-complaint goes beyond a defense to appellee’s claim, and seeks affirmative relief against persons not parties to the original suit. The facts averred at least tend to state a cause of action growing out of the transactions involved which should have been adjudicated in this suit. The motion should have been overruled, the parties should have been brought in* to answer the cross-complaint or take steps to test its sufficiency as seemed advisable to them. This practice in such instances is fully sustained by the decisions of our Supreme Court. Many subsidiary questions are suggested in the briefs which, in view of the conclusion reached, need not be considered. The following decisions in addition to those already cited seem decisive of such questions and also support the conclusion that the trial court erred in sustaining the motion to strike out the cross-complaint of appellant, Chicago, South Bend and Northern Indiana Railway Company. Pomeroy, Code Remedies (4th ed.) 845-847 ; Ellison v. Branstrator (1909), 45 Ind. App. 307, 311, 88 N. E. 963, 89 N. E. 513; Burk v. Taylor (1885), 103 Ind. 399, 3 N. E. 129; Fletcher v. Crist (1894), 139 Ind. 121, 124, 38 N. E. 472; Excelsior Clay Works v. DeCamp (1906), 40 Ind. App. 26, 37, 80 N. E. 981 and cases cited; Standley v. Northwestern, etc., Ins. Co. (1884), 95 Ind. 254, 260; Todd v. Oglebay (1901), 158 Ind. 595, 601, 64 N. E. 32; Cambria Iron Co. v. Union Trust Co. (1899), 154 Ind. 291, 296, 55 N. E. 745, 56 N. E. 665, 48 L. R. A. 41; Hunter v. First Nat. Bank (1908), 172 Ind. 62, 67, 87 N. E. 734; Larue v. American, etc., Engine Co. (1911), 176 Ind. 609, 613, 96 N. E. 772; Chapman v. Lambert (1911), 176 Ind. 461, 467, 468, 96 N. E. 459; 20 Ency. Pl. & Pr. 988; 14 Ency. Pl. & Pr. 92.
7. The entry of satisfaction of the judgment upon the record by appellee would not necessarily bar its collection. The entry might be vacated for sufficient cause or otherwise be shown to be ineffectual against the parties who claimed to own the judgment.'' At least *249there could be an issue formed to determine the validity of the satisfaction and the ownership of the judgment. 23 Cyc 1500; Dunning v. Galloway (1874), 47 Ind. 182; Wheeler v. Emmeluth (1890), 121 N. Y. 241, 24 N. E. 285; Read’s Appeal (1889), 126 Pa. St. 415) 17 Atl. 621.
6. In the case at bar the ruling cannot he held to he harmless on the ground that this court can say, on the record presented, that a correct result was reached. "While we might so declare as to the parties who were before the court, we cannot say as a matter of law that the original judgment satisfied upon the record by appellee, was in fact paid, as against the claims to the contrary of the alleged assignees, as to whom there has been no adjudication of that question. On this point appellees rely especially upon the decisions in Harris v. Randolph County Bank (1901), 157 Ind. 120, 129, 60 N. E. 1025, and Horace E. Wood Transfer Co. v. Shelton (1913), 180 Ind. 273, 277, 101 N. E. 718. The cases do not deal with persons not parties to the suit, who are asserting claims and have sferved notice thereof as in the ease at bar. The questions there decided are not identical with the one presented by striking out the cross-complaint in this case. Giving full credit to the cases cited, they do not sustain appellee’s contention. To avoid multiplicity of suits and adjudicate all claims growing out of the transactions involved in this suit, the alleged assignees of the judgment were necessary parties to a full determination of all phases of the controversy. It may he unfortunate to so hold, hut appellee has himself made possible the situation presented, first, by his attempted assignment of the judgment he had previously satisfied and, secondly, by moving to strike out the cross-complaint instead of meeting any issue properly presented by it and seeing that all conflicting claims germane to the transactions involved in the suit were tried and adjudicated.
The judgment is therefore reversed, with instructions *250to overrule the motion to strike out the eross-eomplaint and for further proceedings not inconsistent with this opinion.
Ibach, C. J., Caldwell, Moran, Hottel and McNutt, JJ., concur.
Note.—Reported in 112 N. E. 552. See under (2-4) 31 Cyc 619-625; (5) 113 Am. St. 639; 31 Qyc 625. (6) New parties, right to bring in by cross-bill, 20 Ann. Cas. 1151; 16 Cyc 200; (7) 23 Cyc 1500.