fixed date

K

Koen Alleman

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

S.Y.M. Wong-A-Ton

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?frame=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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top