I'm back, with yet another nice question.
My date (Field1) stands on top of my form. If someone fills out this form,
they must fill it in.
He saves it as a .xml-file with the date as filename.
If another person opens this .xml-file he can change the date on top of he
form and save it. At this piont, the form indicates another date then the
filename does.
How can I prevent this?
If the date is set for the first time, and saved as .xml-file, this must
never be changed again.
S.Y.M. Wong-A-Ton - 31 Mar 2006 12:05 GMT
Just a note: There is not much you can "prevent" or secure in InfoPath,
unless you are using encryption, since the .xml forms can always be opened up
in Notepad, changed, and saved.
Having said that, you may want to look into using XDocument.IsNew
(http://msdn.microsoft.com/library/en-us/ipsdk/html/xdproIsNew_HV01021289.asp?fra
me=true).
You could check whether it returns false in the OnBeforeChange event handler
of the date field and if it does, set the eventObj.ReturnStatus to false,
which will prevent the change.
---
S.Y.M. Wong-A-Ton
> I'm back, with yet another nice question.
>
[quoted text clipped - 9 lines]
> If the date is set for the first time, and saved as .xml-file, this must
> never be changed again.