Hi,
Scenario:
A user fills out a form from a SharePoint Library and submits the form using InfoPath 2007. (This is not a web forms services form.)
A SharePoint Workflow sends an email to 5 diffent Managers with a link to the xml file which opens in InfoPath 2007.
I need my managers to be sent to their own personalized view to click on a button to approve the form and write their comments, etc.
Since I have 5 managers, I created 5 views.
Because I plan to create many forms I do not want to update each form whenever a new manager gets hired so I want the form to be dynamic.
Otherwise I know how easy it would be to add the user names of the managers to user roles and switch the view with an open behavior rule for each.
Here was my plan.
1. Create 5 text fields and name them Manager1, Manager2, etc.
2. Create a data connection to my SharePoint List which has Job Title and UserName Columns
3. Set the default values of the Manger1, etc fields to filter the data connection based on thier job title and store the appropriate username.
4. Create an Open Behavior Rule for each Manager like so:
Apply the Role when the Condition is True:
Manager1field contains userName() (PS..I also tried "equal to" instead of contains)
Switch to View: Manager 1's View
I ALMOST got this working.
Although I am successfull at setting the correct user name value in the Manger1 field (example: "JSmith") my open behavior rule is not switching the view.
I know I am setting the value correctly as I see "Jsmith" in the field when I preview the form.
But
When if I set the default value to the manager1 field manually to Jsmith and use the same condition, the view switches perfectly.
Any idea why InfoPath does not like my value when it is a result from a data connection filter?
Thanks again for any suggestions you have!!!