cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Assigning Flexi Task to Workflow Variable

Hi,

I am creating a purchase requisition workflow for a group of companies. on some stage, a CFO must approve the request based on the initator's company, so what I am actually doing is as follows:

  1. created a Workflow Variable called "CFO Group Name" of type single line of text.
  2. added a few conditions (if statements) within the workflow before creating the assign flexi task. these conditions will check for the initiator's company.
  3. for example, if the initiator's company is X, then assign set the variable "CFO Group Name" to "Company X CFO".
  4. if company is Y, then set the variable to "Company Y CFO".
  5. if company is Z, then set the variable to "Company Z CFO".
  6. created a flexi task and set the assignee field to the "CFO Group Name" variable.

NOTE: Company X CFO, Y, and Z are group names already been created in sharepoint with users defined inside them.

the problem that I'm facing is the workflow is accepting company X CFO and company Y CFO but not accepting company Z CFO. the error message received is: Failed to send notification. Cannot get the full name or e-mail address of user Company Z CFO.

Please help.

Tags (1)
Reply
8 Replies
Workflow Hero

Re: Assigning Flexi Task to Workflow Variable

You need to have your workflow variable a people picker. That automatically stores the emails and other properties.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Assigning Flexi Task to Workflow Variable

I'd like to know also how you know who the initiator's company is?

0 Kudos
Accept as Solution Reply
Not applicable

Re: Assigning Flexi Task to Workflow Variable

Hi burkslm,

thanks for the reply. I have already tried a people picker variable in the workflow instead of using single line of text and it didn't work out. for example, I set the name of the people picker to "Approvers" of type person or group and then when running the if statements and knowing the company name of he requester I set the "Approvers" variable to "Company X Group" which is already defined in SharePoint. when creating a flexi task and assigning it to "Approvers" I receive an error at runtime that the workflow could not find "Company X Group". I guess its something related to a group within a group.

I will give a try one more time and let you know

0 Kudos
Accept as Solution Reply
Not applicable

Re: Assigning Flexi Task to Workflow Variable

first you need to add the "Company" field to User Profile using Central Admin, by default SharePoint does not map the company name. instead it maps office location.

follow this link:

http://blogs.msdn.com/b/tehnoonr/archive/2010/11/22/mapping-user-profile-properties-in-sharepoint-20...

after that in the workflow, you will find the company field made available when querying user profiles.

0 Kudos
Accept as Solution Reply
Not applicable

Re: Assigning Flexi Task to Workflow Variable

If it works for Company X CFO and Company Y CFO but not for Company Z CFO I would suggest to check if there are differencies between the user accounts in the Y and Z group. The user accounts in the Company Z CFO group, do they have e-mail addresses assigned?

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Assigning Flexi Task to Workflow Variable

I don't think you can do a group within a group.

0 Kudos
Accept as Solution Reply
Not applicable

Re: Assigning Flexi Task to Workflow Variable

Hi Jordy,

all accounts are actually the same! Yes they do have email addresses assigned and the groups owner is the SP admin.

I'm still looking into this issue !

0 Kudos
Accept as Solution Reply
Not applicable

Re: Assigning Flexi Task to Workflow Variable

When I have to accomplish this, I don't use groups at all, instead I manage all my approvers in a list. If all else fails, I would suggest trying that.

  • Create a list, call it something like "Approvers".
  • Add some metadata columns to your new Approvers list for example: "Approver Name" - Person or Group, "Role" - Single Line of Text, "Company" - Single Line of Text.
  • In your workflow before assigning the flexi-task or approval task simply use the Query List action and query the "Approvers" list and filter the results by Company = Z and Role = CFO, Company being a column that was filled in by the initiator of course.
  • From within the Query List action, save the results to your variable and use the variable in the Flexi-Task.

This is what I do all the time and it has never failed on me.

I have all approvers in one manageable location. I can give the list unique permissions and give certain people access to manage the list if changes need to be made.

G

Accept as Solution Reply