Infopath 2007 and Moss 2007

N

news.mirosoft.com

Hi,
I am currently trying to develop a timesheets application that does costings
as well. I have a sharepoint list with staff namee and salary information. I
have successfully managed to get the info from sharepoint into my form using
the XML data from the sharepoint list. So in essence my timesheet works as
it should.
How ever I have been advised that some staff members salaries may change on
a month to month basis and they will update the sharpeoint list to reflect
this.
How can I get my form to get the salary infomation only when the user click
on new form is created and not update every time it is opened or edited?

any ideas

thanks
jamie
 
S

Swathi (GGK Tech)

Hi,
Get the sharepoint list if the form is a new form. Otherwise don’t. Means
when you take a data connection for sharepoint list, uncheck the
‘Automatically retrieve data when form is opened’ check box and query this
using code by putting a condition i.e. if(thisXDocument.IsNew). So that the
values will be there in the xml when the form is new only. And store this xml
in a hidden field. So when the user opens the form next time, try to get the
values from this hidden field xml.
 
Top