President Carter will not be in Iowa tonight, having pulled the plug on the debate of Democratic presidential candidates. But last night he appeared in the living rooms of thousands of Iowans and millions of other Americans across the country.

He appeared as "The President," the star and narrator of a 30-minute television production that, for the moment at least, is the centerpiece of his relection campaign.

Carter was seen as a firm chief executive, directing his congressional relations staff on the handling of energy legislation.

He also was seen as an advocate of peace, telling a Cabinet meeting that his own reelection is unimportant compared with the chance for peace in the Middle East, and as the defender of American security, pledging to a citizens' group his determination to keep the U.S. militarily strong.

And he was seen as the family man, helping his daughter, Amy, with her math homework, and good-naturedly haggling with his wife, Rosalynn about her wish that he appear at an event in Seattle,

No one knows how long Carter will remain off the campaign trail because of the international crises facing the United States. But as the 1980 presidential election campaign begins in earnest he is essentially an electronic candidate, with the 30-minute documentary that was filmed at the White House during four days in October serving as his main vehicle to reach voters.

Two five-minute excerpts from the film have been shown for several days on television stations in Iowa. Thirtysecond commercials also are being cut from the film for use between now and the Jan. 21 precinct caucuses in Iowa, the first step in the presidential election process.

Carter had been scheduled to go to Iowa for the debate among Democratic presidential candidates. But then he withdrew, citing the pressure of events in Iran, and the debate subsequently was canceled.

With Carter sheltered from direct confrontation with his rivals or voters, last night's half-hour telecast was an exercise in the advantages of incumbancy. The film took viewers inside the White House, to the Oval Office, Cabinet Room and other locations, where the president was shown meeting with government officials, directing his aides and generally grappling with the burdens of the presidency.

The Carter campaign committee initially planned to broadcast the 30-minute film during the first week in December. It was engaged in a legal battle with the television networks for the right to buy the time when campaign officials decided it would be "inappropriate" to show the film on television while the crisis in Iran continued. Instead, the committee purchased five-minutes of television time to show the president in a low-keyed talk about Iran and his announcement for relection.

Asked what has changed since December to now make broadcast of the film appropriate, Carter campaign officials offered a variety of reasons.

"It doesn't involve the president's time, for one thing," said a committee official who asked not to be identified. "Personally, I don't see it as inappropriate . . . . It's not partisan, but a very soft-sell political documentary."

Robert Squier, a political media specialist who conceived and produced the film, said he was one of the first to argue against showing the documentary in December. What has changed most since then, Squier candidly admitted, is the approach of the Iowa caucuses and the onset of serious presidential campaigning.

"At some point you've got to deal with the proper mix of running the campaign and what else is on the president's plate," he said. "If it didn't happen now, it wouldn't ever be appropriate."

Squier first proposed the film to Carter campaign officials when the president was at a low point in public opinion polls, far behind his chief rival, Sen. Edward M. Kennedy (D-Mass.). Squier said he argued to Rafshoon and others that the problem was not that voters did not like Carter, but that they did not think he was up to the job -- the so-called "competence" issue that arose in the first year of Carter's presidency.

Squier's solution: Show Carter in action as president, "doing the job."

To accomplish that, Squier installed eleborate lighting facilities in at least a dozen rooms in the west wing of the White House where the president meets with his aides and others. Then, beginning Oct. 3 and ending Oct. 6, the day Pope John Paul II visited the White House, cameras tracked Carter's every move as he went about the duties of his job.

The carefully edited result was far from an intimate look at the inner workings of the Carter White House, but rather splices from Carter campaign speeches accompanied by pictures inside the White House. Several supposedly informal film conversations amounted to campaign statements -- for example, a chat between the president and Council of Economic Advisers Chairman Charles L. Schultze on how the rising price of imported oil is really the major cause of inflation.

Squire made the most of the pope's visit, the major event at the time of the filming. The film opens with Carter learing a Polish phrase from national security affairs adviser Zbigniew Brzezinski with which to greet John Paul II and ends with the president using the phrase as he welcomes the pope and later singing, "America the Beautiful" as he and the pope wave to a crowd on the White House South Lawn.

The president's political position, of course, has changed dramatically since the film was produced. He now leads public opinion polls, with California Gov. Edmund G. (Jerry) Brown Jr. a distant third. Squier said he believes Carter's handlilng of the Iranian crisis has changed public perceptions of his abilities as chief executive, and that the documentary -- plus the shorter political commercials being cut from it -- should help solidify that gain.

Yet the rush of events required some last-minute changes. One such alteration was an additional explanation to viewers that the film was produced before the Soviet invasion of Afghanistan, thus accounting for why the president -- who last week temporarily shelved Senate consideration of the strategic arms limitation treaty -- is shown before a White House audience urging adoption of the pact.