InfoPath UserName vs. Current User

spaced45
spaced45 used Ask the Experts™
on
I just got some great help from an expert with auto populating user information on open. I had one door open only to have another closed on the other end. My question is... Now that I have the form recording userid's and populating emails and all that good stuff, how can I auto populate user info for the person that receives the form. The form is being used to request document translations and my goal is to timestamp and record the translator's info. If I create another field on another view for receiver info I run into the issue of it recording the senders info when the form was originally created. Any help would be much appreciated. Thank you
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Clay FoxDirector of Business Integration

Commented:
When the form opens you should be retreiving the current user credentials. I then would also track state, so have a field called state which can be new, submitted, approved, whatever.

I would have fields in the main data source called requestor, requestor email etc that I copy the returned values into. So make a rule on open which which conditional if state is blank copies user data to requestor fields, another if state = submitted (or whatever) that copies user data to translator username, etc.

This gives you an audit trail you can use to show who did each part and also to use in the email routing etc.
Clay FoxDirector of Business Integration

Commented:
When you track state you can use it for all sorts of conditional rules or to make certain sections hidden or read-only or to change to different views when others open it.

Utilize fields in the form to store each steps data.

Hope that helps.

Author

Commented:
Clayfox,
 Your dead on what I am trying to do. Now, currently at open the form auto populated the current users info at which point the "requester" fills out the form, submits to a sharepoint library and form closes. The translator gets an alert that there is a new item in the form library and he/she reviews the request. I am all over adding the state field like you said but how will that field be updated. Would that be a manual update, lets say from a drop down of states? If so at what point does the form copy user information for the person that is doing the translation? At open? At state update? Lastly you mentioned using conditions to determine the view a user sees. Currently the translator would see the default view that the requester saw and at the bottom of the form the translator enters a predetermined 4 digit code into a text box and hits a "go" button to see admin fields like assigning the task to themselves or attaching the finished doc. Like I said your dead on so I am starting to think that I can automate this form even more.
Director of Business Integration
Commented:
Yah.

I hope you have a submit button at the end of the default view for the requestor. This should ba a rules and custom code button (they all should be) and you have multiple rules on the button, might validate that all required information is there, sets the form state field to submitted, emails, submiots to sharepoint, closes the form, whatever you need.

Then in the form options on open rules have a conditional rule which if form state is submitted then switch views to translate view or whatever.  You can go one step further in if form state is submitted and user does not equal requestor switch to translate view otherwise switch to summary view.  That way if the requestor opens it again they see the summary not the translate.

There is lots you can do. In some ways you have to free your mind from copying a paper form and thing of an application or solution.  The power is all there to do it.

Author

Commented:
Clayfox,

Sorry for the delayed response. I took everything that you said and went nuts with it. As you suggested, I created a state field. Doing this indirectly allowed me to realize that I was leaving out a bunch of roles/tasks in the workflow. I completely neglected to include the step of allocating time for our translators to, well, translate; they dont do it 8hrs a day. Using states I now have been able to direct the "currentuser" to a personal view based on current state, their role in the workflow, and the any prior actions taken by all users. Its giving me great data for reporting the time its taking all users to complete their task. Great Help thank you

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial