Hello, this is my first post i will try to be as brief and clear as i can, i am using infopath 2007 to create an infopath document to simulate some kind of a workflow.
well anyways, i have a secondary datasource xml file called UserRoles.xml and this file contains the user names of my company and the roles they are allowed to choose from at some point during the document workflow based on other criteria of coarse.
the datasource is like this:
<?xml version="1.0" encoding="utf-8"?>
<roles>
<role>
<name>Account Manager</name>
<users>
<username>user1</username>
<username>user2</username>
<username>user3</username>
</users>
</role>
<role>
<name>Proposal Manager</name>
<users>
<username>user8</username>
<username>user1</username>
<username>user3</username>
<username>user7</username>
<username>user9</username>
</users>
</role>
<role>
<name>Department Head</name>
<users>
<username>user4</username>
<username>user5</username>
<username>user2</username>
</users>
</role>
</roles>
now as u can see, each single user might be a member of multiple roles, which is required in my workflow because at some point the user can do things based on his role as account manager then do something else based on his role as proposal manager.
the problem is that how do i retreive which roles is this specific user assigned to?
i get the user using the userName() function
i create a repeating field called "fldAllowedUserRoles"
and i make it's default value like this: name[username = userName()]
the problem is that this formula returns only the first occurance of this specific filter and exits, without checking if this case exists again further in the document.
now how do i create a folrmula to return all the results for this specific username?