InfoPath 2003 SP2 - Multiple Views and Roles Problem

D

David

I am having a heck of a time determining where I am going wrong
here, but I am pretty new to InfoPath so please go easy on me! =)
What I have here is a service request form that I am attempting to
translate from a paper format to an electronic one via our new
SharePoint implementation. This request begins with the "Requestor",
and then must be approved by 3 other groups in escalating authority
before being finally approved and implemented with the 3rd (and
highest) group. I have created a form that has has 4 different views,
depending on what level of the approval process it is currently at
(this goes from lowest to highest):

Requestor (lowest level) - this view only contains info required to be
input by the Requestor, nothing else is visible

Level 2 - This view has all of the Requestor section available to view
(but not alter) plus the relevant fields for the Level 2 approval
process

Level 3 - This view has all of the info from Level 2 and the Requestor
available to view (but not alter) plus the relevant fields for the
Level 3 approval process

Level 4 - This view has all of the info from Level 3, Level 2, and the
requestor available to view (but not alter) plus the relevant fields
for the final stage of approval (or denial)

Basically, each tier of this approval process has the read-only
view of the previous tier plus their respective areas for data input.
Each tier also has their own respective Submit button, which submits
the form to a particular folder within the Form Library (depending on
if it is still Pending, Approved, or Denied) From what I can tell, the
sections all appear as they should when I use the Preview with Roles
option and then take a peek at how the form looks under each role. My
problem is that regardless of what the default view is, and regardless
of the user I am opening the form with from within the library (as it
will be done once in production) it will always open in the lowest
level View (as the Requestor). I am hoping that my lengthy explanation
was not completely indecipherable! I am relatively certain that I am
missing something simple and am just overlooking it time after time
while troubleshooting. I am also not using any custom code, or
programming at all; everything was done within InfoPath 2003 SP2.
I have tried setting the Default View to all 4 views as well as
the Default Role and Initiator to all 4 roles and this does not resolve
the problem - the form will open up as the lowest level entity
(Requestor) every single time. I apologize for the length here, but I
am hoping to answer all of the obvious questions from my initial post;
and hoping someone will know exactly what it is I am missing! Thank you
for any and all help!
 
K

Kevin Farley

David -

No worries. This is an example of declarative programming which is different
than procedural and so it takes a bit to get used to. Basically, Rules are
evaluated in a sense, all at the same time, so it is sometimes tricky to get
the right end result.

Here is the vanilla approach:

1. Define your Roles (which I expect you have), but ensure that you know and
can test precisely which user is in which Role. I trust you have AD Groups
which is the easiest.

2. In the Form Options - Open/Save dialog, I expect you are setting your
Rules for Form Open.

3. Put the Rules in the order of Highest to Lowest (you probably have).

4. Possibly the trick for you is, check the "stop processing when this rule
finishes" otherwise your other lower rules will fire to and the last rule to
fire will win.

Keep trying and you'll get it. We've all been through this and its
satisfying once you get the hang of it.

kjf
 
D

David

Kevin -

Thank you for the reply and information! Let me tell you where I
am at now:

In the Form Options, I have my rules established to run when the form
is opened.

The rules are set to run from highest to lowest - In this case, I
ordered them in the sense of "most privileged group" to the "least
privileged" group. (In the previous post, this would be Level 4 first,
then 3, then 2, then 1.)

I then set the first rule (for the Level 4 group) to stop processing
when this rule completes.

I have temporary user accounts created in AD for this purpose, along
with AD groups as needed.

When I open the form via the "Fill out this form" within the form
library, I am prompted for my username/password. For testing purposes,
I enter the username/password I setup for my Level 1 (or Requestor)
user account. The form appears as it should for someone with
"Requestor" credentials and when I fill out and submit the form, it is
submitted to the folder within the library called "Pending Requests".

I then go into the Pending Requests folder, and click on the new form
present there. When it opens, I am prompted for my username/password. I
enter the credentials for my Level 2 user account. This is where the
problem begins...the form will once again open in the "Requestor" view.
If I exit out and try to open the same form again using my own
credentials, it will still open in the "Requestor" view again. So it
appears that regardless of what account I use to open the form once it
hits the second tier it will always open in this "Requestor" review,
and none of the other fields are present that should be there for the
Level 2, 3, and 4 users.

Which view should I have set as my Default View?
Could you elaborate on the "Stop processing rules when this rule
finishes" setup?

My rules are setup in this format (in the highest to lowest order you
recommended in your last post):

User's Current Role --> Is Equal To --> "Level 4 Group"

The Action is setup as this: "Switch View To" --> "Level 4"

The remainder of the rules are listed in descending order, all with the
same syntax.

Question: Why would I want my rules to stop processing after the first
rule fires, if it is for the Level 4 users?
 
D

David

Also, when designing the form - Which group should be setup as the
Default User Role and which (if any) should be setup as the Initiator?
 
D

David

I also just discovered that if I change the Default user role from the
Level 1 ("Requestor") group to the Level 4 group that the form will
open as if Level 4 credentials were entered even if I open the form
using the username/password of my Level 1 user account...
 
D

David

Again, after playing around with some changes to the Roles I have
defined in the form as well as the Default View I have found that I
think all of my problem is centered around the defined User Roles and
the role that is defined as the Default role.

Currently on the form I have 5 views:

Requestor (lowest level)
2nd Level
3rd Level
4th Level (highest level)
Entire Form

As far as roles are concerned, I also have 5 roles:

Requestor (lowest)
2nd Level
3rd Level
4th Level (highest)
Entire Form

I changed the default role to my newly created Entire Form role and
kept the Requestor form view as the default. When I open the form using
the credentials of my "Requestor" test account, the form appears as it
should for a requestor but I noticed that the role in the
lower-right.corner says "Entire Form". Regardless of what credentials I
use to open the form, it will only display the Requestor view, and
Entire Form appears in the lower-right corner. What am I missing
here....??
 
D

David

I don't think I even need the new role I created called "Entire Form",
or the form view of the same name. This was just something I threw in
there while testing\getting very frustrated. =)
 

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