1

I want to automate the creation of a form that includes several fields that are passed from other Sharepoint lists. So far I've managed to accomplish the task through the use of promoted fields and a workflow.

However, I now find myself wanting to pass a user to a "Contact Selector" so I can get its ID and search its WorkEmail, WorkPhone, Deparment, etc... All of these are things I do from inside the form with the use of "GetUserProfileByName" (which requires UserId I beleive) but, as I said, I want to be able to pass the contact from outside the form so there is no need to open the form, type/search the name, save and close it.

Is there any way to achieve what I am trying to do? I'm not too familiar with code inside the forms but if there is no other way I'd rather try that than not be able to.


edit:

So far I have been able to pass the name of the contact I want to find promoting a field in the Infopath Form.

It would look like the contact selector can find information from a user with the full name of the person you are looking for (if it comes in a certain format) and, in case of doubt between multiple users, it will post a list from which you can seelct the desired one.

The problem with this is that I do not know how to force the contact selector to resolve itself, that is, to execute the query. I have to click the check button next to it in the form or edit the text for it to work. Is there any to force itself to resolve upon opening the form?


edit2:

I ended up ditching the Contact Selector as I figured out I could just pass the AccountID field required for the "GetUserProfileByName" service through a workflow in SharePoint (updating a variable with the "Person or Group" field returns that).

Then I got the information from that field using the information in this link and put it into a text field that would create the connection and update the required fields using a rule.

Since when the form opens it doesn't automatically update everything I had to add a "Update" button. It ends up not being perfect but working well enough for what I wanted.

Now, I don't know why but it is reeeeeeeally slow to load the form in Infopath, much quick to do so in the browser editor.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.