
185 Wis.2d 812 (1994)
519 N.W.2d 668
Gerald C. STRONG, Plaintiff-Appellant,
v.
Patrick E. BRUSHAFER and City of Milwaukee, a
Municipal Corporation, Defendants-Respondents,
AMERICAN MOTORISTS INSURANCE COMPANY,a Foreign Corporation,Defendant.
No. 93-2245-FT.
Court of Appeals of Wisconsin.
Submitted on briefs January 6, 1994.
Decided June 7, 1994.
*815 For the plaintiff-appellant the cause was submitted on the briefs of James W. McCann, with Eisenberg, Weigel, Carlson, Blau, Reitz & Clemens, S.C. of Milwaukee.
For the defendants-respondents the cause was submitted on the briefs of Grant F. Langley and Michael G. Tobin of Milwaukee.
Before Sullivan, Fine and Schudson, JJ.
SCHUDSON, J.
Gerald Strong appeals from a judgment dismissing his personal injury lawsuit against the City of Milwaukee and awarding costs to the City. Because Strong refiled his action against the City and that suit is pending, the merits of his appeal of the dismissal are moot. His appeal of the order awarding costs, however, is not moot. Due to the improper motion practice of Assistant City Attorney Joseph H. McGinn, we reverse the award of costs to the City. Additionally, we remand this matter back to the trial court to address the issue of sanctions against the City and Mr. McGinn, personally.
On February 5, 1988, the truck driver by Gerald Strong was rear-ended by a City of Milwaukee dump truck operated by Patrick Brushafer. On October 5, 1990, Strong filed a notice of claim pursuant to §893.80(1)(b), STATS. On February 1, 1991, 119 days after service of the notice of claim, Strong filed a complaint *816 against the City. Section 893.80(1), however, gives a governmental body, officer or employee 120 days in which to take action with regard to a plaintiff's notice of claim. Thus, on February 4, 1991, 122 days after the notice of claim was served on the City, Strong filed an amended complaint in which he alleged that 120 days had elapsed since he filed the notice of claim with the City of Milwaukee and that the City failed to serve him with a response. The City answered, affirmatively alleging that Strong had failed to comply with the provisions of § 893.80.[1]
On May 9, 1991, the trial court conducted a scheduling conference and entered an order which required, among other things, that all motions for summary judgment and all pretrial motions be heard on or before January 16, 1992. The scheduling order also provided:
All motions which seek to have the court apply an issue of law about which the movant can reasonably expect an opposing party to have differing views MUST be filed together with a memorandum of law setting forth the authorities upon which the movant relies, together with a brief statement setting forth the factual basis for the motion. MOTIONS NOT SUBMITTED WITH SUCH A MEMORANDUM WILL NOT BE HEARD.
(Capitalization in original; bold omitted.) The scheduling order further warned:
Failure to comply with the terms of this Order shall be considered cause for imposing sanctions which may include dismissal, default judgment, contempt, *817 money terms, orders limiting or barring the presentation of testimony or introduction of evidence at trial, or any combination thereof, or such other added and further sanctions as the Court may deem appropriate under the circumstances. See Rule 805.03 Stats.
(Bold omitted.)
On April 12, 1993, fifteen months after the motion cut-off date of January 16, 1992, and as the trial court was about to bring in the jury panel, Assistant City Attorney McGinn orally moved to dismiss Strong's amended complaint on the grounds that the trial court lacked "subject matter jurisdiction" because the original complaint was filed 119 days instead of 120 days after service of the notice of claim.[2] The trial court adjourned the matter until May 3 so that the parties could file written briefs on the issue. According to the final judgment, briefs were filed and additional argument was provided on May 3. As part of his submissions, Strong argued that the City's position was "frivolous," but moved for sanctions against the City under § 802.05, STATS. Strong sought actual costs incurred in preparing for trial, witness fees and actual attorney fees.
The transcript of the May 3 hearing is not in the appellate record. According to the written judgment, the trial court granted the City's motion and dismissed Strong's complaint without prejudice on the grounds that it lacked subject matter jurisdiction. The trial court also granted costs to the City. Although the written judgment fails to address Strong's motion, the trial *818 court's judgment in favor of the City in effect was a denial of Strong's motion. Strong appeals.

I. DISMISSAL OF STRONG'S ORIGINAL COMPLAINT
[1]
Following the dismissal, Strong refiled his action against the City and his case is pending before another trial court. Therefore, we need not address the merits of Strong's challenge to the dismissal of his original complaint or his arguments that the amended complaint rectified noncompliance with the time constraints of § 893.80(1), STATS., and that the City waived the defense of non-compliance with § 893.80(1) by its non-timely motion to dismiss the complaint. These issues are moot in light of Strong's new action arising from the same facts and circumstances. See DeLaMatter v. DeLaMatter, 151 Wis. 2d 576, 591, 445 N.W.2d 676, 683 (Ct. App. 1989) ("A matter is moot if a determination is sought which cannot have a practical effect on an existing controversy.").[3]

II. COSTS TO THE CITY
Section 814.03(1), STATS., provides that " [i]f the plaintiff is not entitled to costs ... the defendants shall be allowed costs ...." (Emphasis added.) Despite Strong's argument to the contrary, this section is mandatory, not discretionary. See Gorman v. Wausau Ins. Cos., 175 Wis. 2d 320, 326, 499 N.W.2d 245, 248 (Ct. App. 1993). Nevertheless, because there is no evidence *819 that the trial court exercised its discretion in deciding to consider the City's improper oral pretrial motion to dismiss the complaint, and our independent review of the record cannot sustain the trial court's decision to entertain the motion, we reverse the judgment of costs for the City.
[2-4]
An appellate court first looks for evidence in the record to indicate that the trial court did, in fact, exercise its discretion. See McCleary v. State, 49 Wis. 2d 263, 277, 182 N.W.2d 512, 519 (1971).
A discretionary determination, to be sustained, must demonstrably be made and based upon the facts appearing in the record and in reliance on the appropriate and applicable law. Additionally, and most importantly, a discretionary determination must be the product of a rational mental process by which the facts of record and law relied upon are stated and the considered together for the purpose of achieving a reasoned and reasonable determination.
Hartung v. Hartung, 102 Wis. 2d 58, 66, 306 N.W.2d 16, 20-21(1981). According to the April 12 transcript at which the issue was first raised, the trial court did not exercise discretion to allow either the late filing of the City's motion to dismiss or to allow the motion to be made orally. In the absence of evidence that the trial court exercised discretion, however, we must nevertheless sustain the trial court's decision if from our independent review of the record the decision is "sustainable as a proper discretionary act." McCleary, 49 Wis. 2d at 282, 182 N.W.2d at 522.
Section 802.01(2), STATS., provides:

*820 An Application to the court for an order shall be by motion which, unless made during a hearing or trial, shall be made in writing, shall state with particularity the grounds therefor, and shall set forth the relief or order sought. The requirement of writing is fulfilled if the motion is stated in a written notice of the hearing of the motion.
Here, Assistant City Attorney McGinn failed to bring the motion to dismiss in writing, as he was required to do since the motion was not made "during a hearing or trial"; nor did Mr. McGinn fulfill the writing requirement by stating the motion "in a written notice of the hearing of the motion." Instead, despite pleading Strong's alleged failure to comply with the requirements of § 893.80, STATS., in the answer filed on behalf of the City, Mr. McGinn simply elected to spring his motion at the proverbial" eleventh hour," in contravention of § 802.01(2), STATS., Local Rule 364,[4] and the scheduling order.[5]
*821 [5]
The City also argues that the court modified the scheduling order. Although a court certainly may modify a scheduling order, see § 802.10(3)(b), STATS. (scheduling order may be modified "upon timely motion of any party" or by the court's own motion), the record does not support the City's contention that the trial court did so in this case.
[6]
Our independent review of the record indicates nothing that would have supported the trial court's decision to consider the City's motion. Therefore, because the motion to dismiss was improperly made, we reverse the trial court order awarding costs for the City.

III. SANCTIONS
Strong argues that the City should have been sanctioned as a result of Assistant City Attorney McGinn's conduct.[6] Strong points out that, in addition to losing his scheduled trial date, "[t]he last minute tactic" by Mr. McGinn caused him to incur "significant expenses" in canceling the appearances of five expert witnesses. *822 [7]
The decision whether to award sanctions is within the trial court's discretion and we will not reverse absent an erroneous exercise of discretion. See Johnson v. Allis Chalmers Corp., 162 Wis. 2d 261, 273, 470 N.W.2d 859, 663 (1991). Strong has failed to provide this court with a transcript of the May 3 hearing. Therefore, we are unable to determine whether the trial court exercised its discretion with regard to the appropriateness of sanctions.
We do not treat the issue of sanctions against an attorney lightly. Mistakes by attorneys can occur, and isolated ones resulting from inadvertence, inexperience or misunderstanding almost always can be corrected without resort to sanctions. See SCR 60.01(7) (LAWYERS COOP. 1992) ("A judge should utilize opportunities to criticize and correct unprofessional conduct of attorneys and counselors, brought to his or her attention ...."). Courts must not, however, stand idly by and allow an attorney to flagrantly ignore appellate court warnings, disobey trial court orders, disrespect adversarial parties and their witnesses, and waste scarce judicial resources.
Assistant City Attorney McGinn has been admonished for his method of motion practice before. In Figgs v. City of Milwaukee, 121 Wis. 2d 44, 56, 357 N.W.2d 548, 554-555 (1984), Mr. McGinn did not affirmatively plead the plaintiff's failure to comply with the procedures of § 893.80, STATS., in the City's answer to the plaintiff's complaint and he waited to bring a motion to dismiss until after testimony was completed in a two-day jury trial. See id. at 48, 55, 357 N.W.2d at 551, 554. Commenting on Mr. McGinn's conduct, the Wisconsin Supreme Court stated:

*823 Fundamental fairness also is required of city officials and their lawyers in the handling and disposition of claims. The city attorney's office asserted the inadequacy of the claim only after a full trial to a jury and after the consumption of at least two days of court time. We cannot believe that the motion for dismissal was delayed for a period of over two years because of inadvertence or ignorance. When the motion to dismiss was made, the assistant city attorney had ready for citation to the court two earlier circuit court cases which purported to support a dismissal of claims against the city of Milwaukee .... We thus find it difficult to conclude that the assistant city attorney was unaware of those cases until after the case was ready to go to the jury. We do conclude that what was known to the Milwaukee city attorney's office must be imputed, institutionally at least, to all of its attorneys trying similar cases and attempting to pose similar defenses relied upon because of earlier cases tried by the city. The record is insufficient for this court to determine whether there was a deliberate withholding from the court of a known, though illconceived, defense or a deliberate ambush set for the plaintiff after large sums of the plaintiffs, the state's, and the city's money was expended in the preparation for trial and the trial of a lawsuit. ...[W]e wholeheartedly agree with the language of the court of appeals that, if purposefully done, "The City's tactics were unseemly."
See id. at 55-56, 357 N.W.2d at 554-555.[7]
*824 Were this the first time Mr. McGinn engaged in this type of motion practice, it is far less likely that we would comment on him personally. Unfortunately, however, despite the supreme court's warning in Figgs ten years ago, Mr. McGinn's conduct continues.[8]
In this case, having pled Strong's alleged noncompliance with § 893.80, STATS., in the answer he filed on behalf of the City, Mr. McGinn was obviously aware of the defense as an issue in this case. Yet despite that awareness, he not only failed to abide by the court-ordered *825 and statutorily required procedure for bringing the motion in writing, he waited fifteen months after the motion cut-off date to bring his motion. Finally, almost as if to punctuate this reprehensible conduct, he voiced his motion as the trial court was about to bring in the jury panel.
[8]
Such "litigation-by-ambush" not only violates the concept of "fundamental fairness," it wastes the resources of the parties and the trial court. Requiring all participants to prepare the stage for trial while waiting in the wings with a potentially dispositive motion need not gain judicial acquiescence. See § 805.03, STATS. ("[F]or failure of any party to comply with the statutes governing procedure in civil actions or to obey any order of court, the court in which the action is pending may make such orders in regard to the failure as are just ...."). We again condemn such abusive and wasteful motion practices as those engaged in by Mr. McGinn.
Therefore, we remand this matter to the trial court for its consideration of the appropriateness of sanctions against the City and Mr. McGinn, personally.[9]
*826 By the Court.Judgment affirmed in part; reversed in part and cause remanded with directions.
NOTES
[1]  We note that in its answer, the City failed to respond to five out of the eleven paragraphs of Strong's complaint. We direct Mr. McGinn's attention to §802.02(4), STATS. (effect of failure to deny averments in pleadings).
[2]  Trial courts have subject matter jurisdiction granted via the constitution and state statutes, but may not be competent to exercise such jurisdiction. See Miller Brewing Co. v. LIRC, 173 Wis. 2d 700, 705 n.1, 495 N.W.2d 660, 661 n.1 (1993).
[3]  Although Strong points out that the City filed a motion to dismiss his new action on the merits, any of these issues that may reappear in the new action would more appropriately be dealt with in that new action.
[4]  Local Rule 364 provides that prior to the service and filing of a motion for summary judgment under § 802.08, STATS., or a motion for dismissal under § 802.06, STATS., a movant "shall obtain from the deputy court clerk a hearing date set not less than 30 days from the service and filing of the motion" and that the movant "[p]rior to the filing" shall serve a copy of the movant's motion and supporting materials "with notice of the hearing date." (Emphasis added.)
[5]  On appeal, the City argues that, despite its failure to comply with the procedural requirements for making its motion to dismiss, it did not have to assert its motion earlier because it pled the affirmative defense in its answer. The City maintains, therefore, that Strong was obligated to bring a motion to strike the affirmative defense under § 802.06(6), STATS. We reject the City's argument. An affirmative defense raised in an answer is not a motion. Bearing the burden of proof on any affirmative defense it pled, the City was required to assert its defenses in the procedurally correct manner. It is not for a party to ignore and attempt to unilaterally change the notice requirements of motion practice.
[6]  We note that in his trial court submissions, Strong requested relief under § 802.05, STATS. Section 802.05(1), however, deals with written motions and the City's motion was brought orally. Therefore, we will construe Strong's request for relief as having been brought under § 805.03, STATS., that "for failure of any party to comply with the statutes governing procedure in civil actions or to obey any order of court," authorizes the trial court to "make such orders in regard to the failure as are just...."
[7]  This court had observed:

In addition to not pleading the jurisdictional defect in its answer, the City also did not move to dismiss this case based on the jurisdictional defect until after trial testimony was completed when the judge was naturally reluctant to lay to waste the foregoing proceedings. The City's tactics were unseemly, especially insofar as Figgs was made to incur the expenses of an unnecessary trial.
Figgs v. City of Milwaukee, 116 Wis. 2d 281, 287, 342 N.W.2d 254, 257 (Ct. App. 1983), reversed, 121 Wis. 2d 44, 357 N.W.2d 548 (1984).
[8]  In a recent unpublished decision, Beckom v. Brown, No. 92-1658 (Wis. Ct. App. June 2, 1993), we admonished Assistant City Attorney McGinn for similar conduct. In Beckom, although Mr. McGinn pled as an affirmative defense the basis for which he eventually moved the trial court for a dismissal, he waited until five days before trial to bring a motion to dismiss. We warned:

The timeliness of such motions to dismiss filed by the City has previously been criticized by this court and the Wisconsin Supreme Court as "unseemly." Such "trial by ambush" tactics are not only violative of "fundamental fairness," but waste the resources of the parties and of the court by requiring all to continue preparing the matter for a trial when the party eventually moving for dismissal knows that the matter may warrant disposition short of a fullblown trial, and yet fails to alert the court until the proverbial eleventh hour. We continue to condemn such practices.
Id., slip op. at 4 n.2 (citation omitted). In fairness to Mr. McGinn, we note that our warning in Beckom was not issued until approximately two months after his conduct occurred in Strong's case. Beckom, however, further confirms that Mr. McGinn has continued the improper motion practices twice admonished in the Figgs appeals.
[9]  Additionally, we note that it is within a trial court's discretion to prohibit government attorneys from seeking reimbursement from their employer for their sanctionable conduct. See Chilcutt v. U.S., 4 F.3d 1313, 1325-1327 (5th Cir. 1993) (assistant United States Attorney barred from seeking or obtaining reimbursement for sanctions for flagrant disregard of discovery obligations and intentionally misrepresenting certain facts to the court).

We also reject Strong's request for frivolous appeal costs under RULE 809.25(3), STATS. See Peck v. Meda-Care Ambulance Corp., 156 Wis. 2d 662, 675-676, 457 N.W.2d 538, 544 (Ct. App. 1990) (frivolous appeal costs under RULE 809.25(3) may not be awarded to appellants).
