Can the current user open two differnt views of an infopath form?

Q

QT.Nguynh

Hi,

Could any one help me figure out what is wrong with this?

I have created two user roles and 2 corresponding views. When the form
detect the same user role for both of the user roles, the same view is
displayed when I open them from the email to which it is attached upon
submission. However, the form detects two different roles for the two
different views, different views are displayed.

What I am trying to say is that. I defined two user roles and these
roles are created based on the input of the form. When the form is
emailed to two email address (based on the input also). If the two
email adresses happened to be the same and the the two user roles
happened to be the same, then the same view is displayed when both of
the attachment of both of the email is opened. Howver, if the two email
addresses are differnt and the current user roles are diffent, then the
right view is displayed.

In the Open and Save under Form Options, I added additional conditions
to make the two view's open coditions different (ie. I added a
condition that 'approved' is true for the 'Manager View' to be
displayed) However this didn't solve the problem.

Is there a workaround for this problem? Or what am i doing wrong?
Could you send an additional response to (e-mail address removed). I'd
greatly appriciate it!


Note: I tried to switch the views before sending the emails, but the
default view is displayed. Is this how it is supposed to behave?

Thanks very much!

Quan

I'm puzzled now. Please give me some information on this!

Thanks very much!
Quan
 
F

Franck Dauché

Hi,

You can switch View by code using:
thisXDocument.View.SwitchView("MyViewName");

Or, if I understand your problem right, you can change the default View on
form Load using:
thisXDocument.ViewInfos["MyViewName"].IsDefault = true;

Franck Dauché
 
Q

QT.Nguynh

How would you do this using Rules. Because a view should only be
displayed based on the defined current user.

By the way, is there any way to get the list of user roles within
managed code?

Thanks!
 

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