
605 N.W.2d 6 (2000)
Shawn Ryan ROUSH, Appellant,
v.
MAHASKA STATE BANK and David L. Shelquist, Appellees,
v.
Howard Roush, Third-Party Defendant.
No. 98-474.
Supreme Court of Iowa.
January 20, 2000.
Rehearing Denied February 11, 2000.[*]
*7 Jerry Wieslander of Frank G. Wieslander, P.C., Altoona, for appellant.
Randall C. Stravers of Pothoven & Stravers, Oskaloosa, for appellee Mahaska State Bank.
*8 H. Raymond Terpstra, II of Terpstra, Terpstra & Epping, Cedar Rapids, and Stanley R. Parker of Parker & Hay, LLP, Topeka, Kansas, for appellee David L. Shelquist.
Considered by LARSON, P.J., and LAVORATO, SNELL, CADY, and HARRIS,[**] JJ.
CADY, Justice.
This is an appeal from a judgment entered on the pleadings. We affirm in part, reverse in part, and remand for further proceedings.

I. Background Facts and Proceedings.
Shawn Roush owned a 1979 General Motors half-ton truck. On May 31, 1995, the Mahaska State Bank took possession of the truck pursuant to a writ of replevin issued by the district court in an action against Howard Roush. The Bank maintained a security interest in the business inventory of Howard, who apparently represented to the Bank that the truck was part of the business inventory. Shawn was not a party to the action, and subsequently made repeated requests to the Bank for the truck. The Bank eventually released the truck to Shawn on August 11, 1996.
On May 29, 1997, Shawn commenced this action against the Bank and its agent or employee, David Shelquist, based upon their alleged wrongful conduct in taking possession of the truck. The petition was captioned "Petition in Replevin," but Shawn acknowledged the Bank had released possession of the truck. It requested judgment for damages to the truck including depreciation and loss of use. Shawn also requested punitive damages and damages for emotional pain and suffering.
The Bank and Shelquist filed a cross-claim against Howard for indemnity, and subsequently moved for judgment on the pleadings against Shawn. They claimed an action in replevin could not be instituted as a matter of law since Shawn had possession of the property at the time the action was commenced. Shawn claimed possession did not affect his right to institute a replevin action for damages resulting from past detention. He also asserted his claim for damages was alternatively supported by other theories recognizable under notice pleading, which he was entitled to pursue independent of replevin.
The district court granted the motion for judgment on the pleadings and dismissed the petition. It concluded damages for wrongful detention were not available in a replevin action when the petitioner held possession of the property at the time the action was commenced.

II. Scope of Review.
We review a grant of judgment on the pleadings for corrections of errors at law. Iowa R.App. P. 4.

III. Judgment on the Pleadings.
A judgment on the pleadings is authorized by Iowa Rule of Civil Procedure 222. This rule provides:
Any party may, at any time, on motion, have any judgment to which he is entitled under the uncontroverted facts stated in all the pleadings, or on any portion of his claim or defense which is not controverted, leaving the action to proceed as to any other matter of which such judgment does not dispose.
Iowa R. Civ. P. 222.
The proper function of a motion for judgment on the pleadings is to test the sufficiency of the pleadings to present appropriate issues for trial. See Hurd v. Odgaard, 297 N.W.2d 355, 356 (Iowa 1980). The motion is only appropriate when the pleadings, taken alone, entitle a party to *9 judgment. Stanton v. City of Des Moines, 420 N.W.2d 480, 482 (Iowa 1988).
Replevin is a specialized statutory remedy with a narrow purpose designed to restore possession of property to the party entitled to possession. See Ankeny Community Sch. Dist. v. Van Gorp, 501 N.W.2d 506, 507 (Iowa 1993). Although damages are available to the successful party in a replevin action, replevin is not an action for damages. See Iowa Code § 643.17 (1997) (judgment for possession includes award for damages); Campbell v. Williams, 39 Iowa 646, 648 (1874) (the question in replevin is who is entitled to possession of the property at the time the action was commenced). An award of damages in a replevin action is incidental to the purpose of regaining possession. See Lyons v. Shearman, 245 Iowa 378, 381, 62 N.W.2d 196, 197 (1954). Thus, we agree with the district court that replevin is not available when the plaintiff is in actual possession of the property subject to the replevin. Accord, Aber v. Bratton, 60 Mich. 357, 27 N.W. 564, 566 (1886) (no replevin action can be maintained where plaintiff already has possession); Wheeler & Wilson Mfg. Co. v. Teetzlaff, 53 Wis. 211, 10 N.W. 155, 158-59 (1881) (as appellant had possession of the machine at commencement of the action, no right of action to replevy the same existed).
Although Shawn acknowledged physical possession of the truck, he claims replevin is still available because the Bank maintained constructive possession of the truck. He asserts the Bank had constructive possession based on its claim of a security interest which affected his ability to use the truck.
We recognize some states permit an action for replevin based upon constructive possession. See 77 C.J.S. Replevin § 30, at 335 (1994); 66 Am.Jur.2d Replevin § 26, at 851-52 (1973). In such actions, however, neither the plaintiff or defendant have possession of the property. Instead, the property is possessed by a third party and the defendant has the ability to direct the third party to deliver possession of the property to the plaintiff. See Bush v. Belenke, 381 So.2d 315, 316 (Fla.Ct.App.1980) (property in agent's possession); see also Black v. City of Cleveland, 58 Ohio App.2d 29, 387 N.E.2d 1388, 1390 (1978) (defendant deemed in constructive possession, despite inability to produce item, as had wrongfully sold plaintiff's property to third party to avoid replevin action); Barnes v. Keller, 94 Ohio App. 107, 114 N.E.2d 604, 606 (1952) (warden deemed in constructive possession where transferred plaintiff's bear cubs to third party for care; and though cubs not recoverable directly from warden, money damages available); Main v. Miami Money Store, Inc., 655 So.2d 148, 149-50 (Fla.Ct.App.1995) (as defendant did not have control over plaintiff's diamond which had been seized by the police, defendant was not in constructive possession); Petty v. Borg, 106 Utah 524, 150 P.2d 776, 781-82 (1944) (defendant, not in actual possession, who claimed to be owner of car regarded as having sufficient control to maintain replevin action against where person who did have possession recognized defendant's claim in car). The facts of this case do not support an action based on constructive possession, and it is unnecessary for us to determine whether such a cause of action is recognized in Iowa.
Nevertheless, there are other legal principles which must be considered in resolving this appeal. The facts set forth in a petition are accepted as true in deciding a case on the pleadings. Crawford v. City of Des Moines, 255 Iowa 861, 867, 124 N.W.2d 868, 871 (1963). Moreover, a petition is not limited by its caption, but is required to be read in light of the allegations and legal ramifications contained within the four corners. See Schulte v. Mauer, 219 N.W.2d 496, 502 (Iowa 1974); In re Robinson's Estate, 231 Iowa 1099, 1102, 3 N.W.2d 158, 160 (1942). Furthermore, a pleader is not required to identify specific theories of recovery in a petition. Wendland v. Sparks, 574 N.W.2d 327, 329 *10 (Iowa 1998). Instead, a petition must only give notice of the incident giving rise to the claim and the general nature of the action, although a party may be limited to a specific theory of recovery when the party limits a pleading or presentation to the court to exclusive theories. Id.
Applying these principles to the petition in this case, we think it was apparent Shawn did not file his action to regain possession of the truck, but sought damages for the wrongful detention of his property. Although replevin was not available because Shawn had possession of the truck, the resistance to the motion for judgment on the pleadings showed he alternatively asserted "the theories of conversion, negligence, breach of contract ... and tortious interference" to support the claim for damages. See Tigges v. City of Ames, 356 N.W.2d 503, 507 (Iowa 1984). Thus, under our notice pleading, the petition combined a claim for damages and a claim for replevin.
We recognize a replevin action may not be joined with other claims for recovery. Iowa Code § 643.2. Yet, the remedy for misjoinder is not to dismiss the action, but to docket the misjoined action separately or strike those which should be stricken, always retaining at least one cause docketed in the original case. Iowa R. Civ. P. 27(b). Additionally, the party whose pleading is attacked may withdraw any improperly joined claim before a ruling by the court. Id. However, the remedy for misjoinder must be made by motion. Id. Misjoined actions, consequently, can be considered in a single proceeding by agreement of the parties or the failure to object to the misjoinder. See Interfirst Bank v. Hanson, 395 N.W.2d 857, 859 (Iowa 1986).
In this case, the Bank chose not to seek the remedy for misjoinder but elected to obtain judgment on the pleadings. However, only the replevin action was subject to dismissal on the pleadings. Our rules of practice permit a judgment on the pleadings to be granted on a portion of a claim. Iowa R. Civ. P. 222. When this is done, however, the action proceeds as to other viable claims. Id.
In this case, the district court properly granted judgment on the claim for replevin. Under notice pleading, however, the petition stated a viable claim for damages supported by other legal theories. This claim must survive judgment on the pleadings and is not subject to dismissal for misjoinder. Accordingly, the district court erred by dismissing the case. We reverse the order of the district court and remand the case for further proceedings on the petition and cross-claim.
AFFIRMED IN PART, REVERSED IN PART, AND REMANDED.
All justices concur except HARRIS, S.J., who dissents.
HARRIS, Senior Judge (dissenting).
As the majority concedes, Shawn is expressly prohibited by Iowa Code section 643.2 from joining his conversion, negligence, or breach-of-contract claims with his replevin action. The statutory prohibition is not imposed flippantly. Replevin, derived from one of the common law's most ancient remedies, is deliberately narrowed in order to better serve its limited purpose of readily restoring property to the one entitled to its immediate possession. This special purpose could be frustrated if parties fell into other, even related, controversies. It seems clear, and again the majority does not contend otherwise, that the replevin action was dead on arrival at the courthouse.
The majority preserves the improperly joined claims on the basis of notice pleading. Although I continue to strongly welcome the notice pleading reform, I am convinced the majority carries it too far. The majority reaches its holding by disregarding Shawn's purpose in seeking this special remedy. He insisted in district *11 court, in his appellate brief, and even on oral submission of the appeal, that he pursues a replevin remedy. I cannot agree to ignore him and, on the basis of notice pleading, find him a better lawsuit. When the replevin action falls, as it is agreed it must, any improperly attached claims fall with it. I think the district court was correct in so holding.
I would affirm.
NOTES
[*]  Carter, J., taking no part.
[**]  Senior judge assigned by order pursuant to Iowa Code section 602.9206 (1999).
