
    FRATERNAL ORDER OF POLICE, MIAMI LODGE 20, and AFSCME Local 1907, Appellants, v. CITY OF MIAMI, Appellee.
    No. 79-1473.
    District Court of Appeal of Florida, Third District.
    June 10, 1980.
    Weinsoff & Weinsoff and Alan Eichen-baum, Miami, for appellants.
    George F. Knox, Jr., City Atty. and J. Michael Haygood, Asst. City Atty., for ap-pellee.
    
      Before BARKDULL and BASKIN, JJ., and EZELL, BOYCE, F., Jr. (Ret.), Associate Judge.
   BARKDULL, Judge.

The appellants, as plaintiffs, filed a declaratory decree action seeking a ruling that Sections 447.301(2) and 447.309(5), Florida Statutes (1977) were unconstitutional, naming the City as a defendant because of its actions under the statutes in collective bargaining agreements with certain of their employees. The City filed a motion to dismiss, alleging that the plaintiffs had been given notice of and, in fact, that plaintiffs filed a memorandum of law in an action before the Public Employees Relations Commission that had lately been pending wherein the City sought a request for declaratory statement. The trial court granted the motion to dismiss upon the ground that it lacked subject matter jurisdiction, the plaintiffs being limited to their right of appeal of the final agency action of PERC to a district court of appeal pursuant to Section 447.504, Florida Statutes (1977).

We reverse upon the authority of Coulter v. Davin, 373 So.2d 423 (Fla. 2d DCA 1979) and the reasoning contained therein. In the instant case the matter was not ripe for a determination that the PERC proceedings were in fact res adjudicata and prevented the instant independent action. Nothing in the plaintiffs’ complaint referred to the agency action; extraneous matters are not to be brought in by a motion to dismiss [see: Stone v. Stone, 97 So.2d 352 (Fla. 3d DCA 1957); Hembree v. Reaves, 266 So.2d 362 (Fla. 1st DCA 1972); Stern v. First National Bank of South Miami, 275 So.2d 58 (Fla. 3d DCA 1973); Beach Roundhouse Town Corp. v. Skinner, 356 So.2d 881 (Fla. 3d DCA 1978)] and such would be appropriate to be filed as an affirmative defense.

In the cited ease (Coulter, supra) the plaintiff referred to the agency action in his complaint; this is not the situation in the instant case. Therefore, when the matter is returned to the trial court if the City, upon appropriate pleading, urges the affirmative defense of res adjudicata or lack of subject matter jurisdiction because of the appellants’ failure to pursue the appellate remedies from the PERC action, as provided by Section 447.504, Florida Statutes (1977), it will then be incumbent upon the trial judge to analyze the agency action to determine whether it is the type that an aggrieved party must appeal pursuant to Section 447.-504, Florida Statutes (1977), or whether it is the type wherein an aggrieved party may bring in an independent action. The test to establish this alleged unconstitutionality is amply outlined in the opinion in Coulter, supra.

Reversed and remanded, with directions to the trial court to require the City to file an answer, and then for the trial court to take such further proceedings as it deems appropriate under the issues as then framed.

Reversed and remanded, with directions. 
      
      . Hereinafter referred to as PERC.
     