Using a combo of a View and Data Connection we will be able to grab ALL of the fields from a List or Library.
1. Open a Text file so you can paste stuff into it.
2. Open the site you want to gather the data from.
3. Navigate to Site Action > Site Settings
4. Under General Settings click on Audience targeting settings. With this page open look at the URL. Starting with the word List, copy everything to the right.
Example: List={515dc5f2-88b9-4f91-80a3-4e133f25d069}
5. Using your Text file, first paste your new List GUID onto the file, next page this string on a another line _vti_bin/owssvr.dll?Cmd=Display&List={GUID}&XMLDATA=TRUE&noredirect=true
6. Now, going back to your List GUID copy everything between the {} brackets. Then paste it into the {GUID} string got from my site, replacing GUID.
Example: _vti_bin/owssvr.dll?Cmd=Display&List={515dc5f2-88b9-4f91-80a3-4e133f25d069}&XMLDATA=TRUE&noredirect=true
7. Go back to your site and paste the long string you just create into the sites URL (see example below for more detail).
Example: http://SiteName/SubSiteName/_vti_bin/owssvr.dll?Cmd=Display&List={515dc5f2-88b9-4f91-80a3-4e133f25d069}&XMLDATA=TRUE&noredirect=true
8. You should now see a page full of XML pertaining to your List or Library.
To take this to the next level you can create a View to narrow down the columns returned in the XML.
1. Create a new View with the fields you want.
2. Edit your newly created view. With the Edit View page open scroll down to Mobile section. Looking at the URL under “Web address for this mobile view:”, grab all the letters and numbers after View=
3. Open this site (http://meyerweb.com/eric/tools/dencoder/) and paste that string into the URL Decoder/Encoder box and click the Decode button.
4. You should now have a cleaner GUID.
5. Paste that new GUID into your Text file.
6. We will now want to join the new GUID with our existing URL string (see below for example).
Example: http://SiteName/SubSiteName/_vti_bin/owssvr.dll?Cmd=Display&List={515dc5f2-88b9-4f91-80a3-4e133f25d069}&XMLDATA=TRUE&noredirect=true&View={8478D19F-831D-45CB-8F24-A481444C5418}
7. You should now see different results than the first URL string we created.
Now the good stuff! Using the URL you can create XML Data Connections in InfoPath and be able to view columns that were once unavailable.