For those who went from candidate to elected official after the votes were tallied in Tuesday’s primary, all that walking door to door, shaking hands and making the case must deftly transition to working as a public servant. For those assuming legislative positions that means juggling district constituents’ concerns with countywide — or statewide — needs. They might not always be one and the same.

For judges who will take the oath to uphold the law, it means a tough balancing act: maintaining respect for the courts, treating all who come before them fairly and courteously, and all the while doling out justice.

In the highest profile local race, Daniella Levine Cava pulled off the difficult feat of ousting Miami-Dade County Commissioner Lynda Bell, in a costly and partisan race. Ms. Levine Cava’s victory, however, is rooted in demographic changes in the rural/urban/residential District 8 that worked in her favor; the candidate’s ability to articulate a vision of a fairer, more livable community — informed, no doubt, by her years running a respected social-service agency that helped low- and middle-income families become self-sufficient; and, given her appeal to union workers, the desire to blunt County Mayor Carlos Gimenez’s attacks on their compensation.

With Ms. Levine Cava on the dais, she stands to become the swing vote that the county employee unions are looking for. Ms. Bell was a solid backer of the mayor’s push for union concessions. Is it coincidence that the county executive announced on Primary Day a more accommodating stance, leading to tentative contract deals?

There were several closely watched judicial races, too. In two of them, one in Miami-Dade, the other in Broward, highly scrutinized — and still troubling — candidates will be on the bench.

Veronica Diaz, an assistant Miami city attorney, defeated former School Board member Renier Diaz de la Portilla for a seat in Circuit Court, despite serious questions over professional integrity. Miami-Dade County Commission on Ethics determined that she funneled city jobs to her fiancé’s law firm through a third party, not disclosing the ties. She toed the legal line closely enough to avoid having a complaint filed against her — a fiancé is not an immediate family member under the county’s anti-nepotism rules. But that gives small comfort to anyone concerned about judicial integrity.

In Broward County, incumbent Judge Lynn D. Rosenthal was re-elected, a month after she accepted a plea deal to a charge of reckless driving. In May, this judge, behind the wheel of an SUV, was arrested after repeatedly running into a security gate, then hitting a patrol car. Though a Breathalyzer test came up negative for drinking, Ms. Rosenthal refused to submit to blood or urine tests and initially tried to keep her mug shot from being made public. Again, another possibly problematic judge dispensing justice.

Where officials who sit on commissions and councils, school boards, and even in Congress generally conduct their duties in the public eye, aided by media scrutiny, judges labor in more isolated environments. Lawyers and defendants come before them, but the wider public remains basically clueless as to how judges conduct themselves.

Given their missteps, Ms. Diaz and Ms. Rosenthal have an obligation to assure all who have an expectation that they will follow the law, that the faith — or forgiveness — voters showed by installing them in office will not be squandered.