Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I created an Infopath form and would like to have a particular field to be set to some default value every time this form is submitted (the field is not shown on the form, user should not have to manually input this field). Is it possible to write values to a SharePoint list via some InfoPath rules? I have tried making a rule "action" ( specifically "set a field's value") but the data connection I have seems to be "receive"-only, so it doesn't actually change the list field I want when I submit the form. Perhaps there are other ways to do it such as with a content-type-specific workflow?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You can create a hidden section and put the fields you desire to promote within there and hide it with formatting rules. Be sure to set the defaults to what you like and when the form is submitted, the promoted fields will be updated.

Alternatively, you could create a workflow on item creation to set the values.

share|improve this answer
    
Thanks for your response. As I mentioned in the question, your first suggestion is proving to be difficult since I can't get to the field I want to bind to because InfoPath only seems to be able to write to fields if it is a Document Library (I am submitting to a SharePoint list). I am only able to do a "receive" of that list data, not a "submit", unless I am missing something. –  Alex Dec 27 '12 at 17:25
    
Then you'd just need to create a column with a default value that you desire and when the form is submitted, the column should be populated with the value. –  PirateEric Dec 27 '12 at 18:12
    
That would normally work, but in my situation the goal is to have the "default" value be different based on what content type is being created. For example, if creating a content type of "Dog" the "name" field would be auto-set to "Fido" and if creating a "Cat" content type the "name" field would be auto-set to "Whiskers" (This is just an example not what I'm using) –  Alex Dec 27 '12 at 18:43
    
I'd do it with an on creation workflow based on the content type set t he field to the proper value. I can think of more complex ways to do it in InfoPath if needed. –  PirateEric Dec 27 '12 at 20:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.