I have an infopath form published as Web Broswer enabled , this infopath form is a survey taken by many people in different teams (same person can work for 2 different teams) , I would like to restrict the person to take the survey only once based on the team he belongs. Please let me know how to achieve this ?
How about make every single feedback (infopath form) with a unique name with the person's name? So, he can't submit a 'duplicate' feedback. For example, if Jony in both IT and Admin team, and Jony(IT) submitted his feedback with the infopath file name "Jony.xml". Then, Jony(Admin) can not submitted anymore, because "Jony.xml" already there.
Goto your infopath form library's settings page, make the name or title column unique. Then, modify your infopath form's publish settings to provide a default file name with the current user's name and do not allow "Replace existing file".
While submitting your Infopath form, save the form into the library with the submitted users Name and Department.
Here is an excellent post that describes how this can be done in simple steps using SharePoint builtin webservices- http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-2D00-Get-the-current-user-without-writing-code.aspx
Also, create a data connection that queries the results from the same SharePoint list and save it in some hidden fields.
On Submit button click, create a rule to compare whether the logged in user from the same department has previously submitted using the values in the hidden field.