Super Simples Notes Field with History in Infopath
It is common for an Infopath based process to require the use of a notes field that allows users to add to but not edit the notes history. This is a snap with couple of rules and one hidden text field:
1) Create three text boxes and one button. All text boxes should be multi-line. In my case I named them:
a. NewNote
b. NotesHistory
c. CarriageReturn
d. SaveNewNote (button)
2) The NotesHistory textbox should be the largest (perhaps 8 or 10 lines; the full width of the form) as it will display all prior notes. This text box should be set to read-only in it's control properties.
3) I typically make the NewNote textbox large enough for two lines of text (the full width of the form)
4) The SaveNewNote button should be placed after the NewNote textbox and before the NotesHistory text box accompanied by a note to the effect of, "New notes will only be saved by clicking this button"
5) The CarriageReturn text box should be hidden and have it's default value set in the function builder to:
a. Type an open quotation "
b. Hold down the Control key and hit the Enter key
c. Type a close quotation "
6) Finally configure a rule for the SaveNewNote button including the following Actions:
a. Set a Field's Value > Field: NotesHistory > Value (function builder) : concat(today(), ": ", NewNote, CarriageReturn, NotesHistory)
(Note that NewNote, CarriageReturn and NotesHistory are inserted using the "Insert Field or Group" button)
b. Set a Field's Value > Field: NewNote > Value:
This button will successfully update the NotesHistory with the new note at the top preceded by the current date.
Happing Infopathing,
Joseph