Hey Alan.
Typically I would add another field to your form and store the form name in
it (form.xml). Use the same formula you use for the SharePoint submit data
connection.
Then create a SharePoint receive data connection on the library and then use
the form name to filter the list and get the promoted properties values for
use in your form calculations.

Signature
Clay Fox / Microsoft InfoPath MVP
www.InfoPathDev.com / The InfoPath Authority / Downloads, Samples, How-To,
Experts, Forum
> I have a form that I want to populate fields from specific record (form) in a
> SharePoint library when the form is opened.
[quoted text clipped - 14 lines]
> get data from the previous form. I need to know how to specify the ID of the
> previous form.
Alan - 05 Feb 2008 17:35 GMT
I'm relatively new to InfoPath. In building the recieve data connection I
don't see a way to filter the records in the SP list.
> Hey Alan.
>
[quoted text clipped - 23 lines]
> > get data from the previous form. I need to know how to specify the ID of the
> > previous form.
Clay Fox - 05 Feb 2008 17:47 GMT
Is the same form being opened each time?
If so why don't you just store the calculated value in it?
With SharePoint there is no way to filter in the data connection itself.
All items in the view will be loaded into your form.
But when you set values from the loaded list you can use a filter to specify
which record to use.
So calculatedvalue[formname=SPFormname]
This will retrieve the value where form name in the list = form name stored
in your form.
When selecting a field the filter button in in the lower left of the window.

Signature
Clay Fox / Microsoft InfoPath MVP
www.InfoPathDev.com / The InfoPath Authority / Downloads, Samples, How-To,
Experts, Forum
> I'm relatively new to InfoPath. In building the recieve data connection I
> don't see a way to filter the records in the SP list.
[quoted text clipped - 26 lines]
> > > get data from the previous form. I need to know how to specify the ID of the
> > > previous form.