Here is a sample for the IP 2003 model -- this is C#, and I think you may be using script:
//Create the new, blank workorder -- path changes according to your template location
XDocument workOrder = thisApplication.XDocuments.NewFromSolution(@"C:\ComputerName\Folder\TemplateName.xsn");
//Convert to IXMLDOMDocument2
IXMLDOMDocument2 workOrderDOM = (IXMLDOMDocument2)workOrder.DOM;
//Set the namespace -- changes according to YOUR form
workOrderDOM.setProperty("SelectionNamespaces", "xmlns:my=\"http://schemas.microsoft.com/office/infopath/2003/myXSD/2008-07-06T22:11:15\"");
//Set a field -- xpath changes according to your target form
workOrderDOM.selectSingleNode("/my:WorkOrders/my:EstimateId").text = "SomeValue";
Search the forum for NewFromSolution to find other samples, I think there may be some script samples out there....