Friday, April 19, 2013

InfoPath WebParts Actually Easy To Use.

Having gotten VS2010 on the server up and running, know what it is time to do?

Throw it the fuck out the window and boot up InfoPath. It does all the shit you're trying - PAINSTAKINGLY! - to learn and do, except it does it better, smoother, and with an actual front end. It turns out that sometimes, things work out fine.

Note: there are totally ways to do this in VS2010, but who cares? Again, not you! YOU care about getting it done faster. And, it seems, totally accidentally following best practice. Surprise!

Here's how to make a form page that loads information straight to a list using InfoPath.

  1. Go to Sharepoint, and, paying careful attention to the client spec, create a custom list on your site.
    • Include appropriate column types - date, names, that sort of thing.
  2. Go to the Pages directory of your relevant subsite.
  3. Create a page to pull the list view into; list views can be webparts.
  4. Edit the view of the webpart so the things you want are showing.
    1. Click "edit webpart"
    2. In the top part of the hideous pop-in frame there will be a link to "edit current view"
    3. This will give you the library view editing interface for the webpart. Clickybox away.
  5. Boot InfoPath.
  6. Create New Form from Sharepoint List.
  7. Enter the URL of your list.
  8. In the form, turn off the Title field's mandatory little red star.
  9. Delete the title field, unless you feel like turning it into an invoice number recorder.
  10. Adjust your form as you like. 
    • Reflect that Microsoft did this on purpose, released this as a separate product, and that it is probably fine.
    • Wonder what has happened to your glorious, brutal temper in your old age. Perhaps you have mellowed.
  11. Publish the form to the appropriate list.
  12. Shut down your browser, restart, navigate to the page you made to contain your list.
    • If you don't do this, it won't register the form's published existence.\
    • Irritating red text for all.
  13. Insert an Infopath webpart, which will automatically link to the list web part.
  14. Turn on asynchronous loads.
  15. Well what the fuck do you know, it worked on the first try and looks dandy.
Perhaps things are getting better in our old age! Maybe we can make a calendar webpart that calendars like a calendar next! Between this, the weather and the haircut, today is actually a-okay.

No comments:

Post a Comment