cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
nderiley
Nintex Newbie

How can I aggregate list values into 1 variable?

Jump to solution

Here is my challenge.  I'm working with 3 lists. 2 that are more or less static and need to feed the 3rd, I'm struggling on how to accomplish this via Nintex.  Below is a simplified model of my SP lists:

Package

  • Reviewers (person or group/multi)
  • Portfolio (single line of text)

Reviewers

  • Reviewers (person or group/multi)
  • Portfolio (single line of text)

Approvers

  • Approvers (person or group/multi)
  • Portfolio (single line of text)

When a user makes a Package list item, I must query the Reviewers and Approvers lists where Portfolio = Portfolio and aggregate the reviewers and approvers columns into the  Package reviewers column.

For example:

Reviewers

  1. Portfolio=Peanuts; Reviewers=Charlie Brown, Snoopy
  2. Portfolio=TMNJ; Reviewers = Donatello, Raphael, Michelangelo

Approvers

  1. Portfolio=Peanuts; Reviewers= Charlie Brown, Linus
  2. Portfolio=TMNJ; Reviewers= Shredder

When I create a package and select portfolio = Peanuts, Reviewers for the package should = Charlie Brown, Snoopy and Linus.  So not only do I need to combine, but I need to de-duplicate.

What I'm currently attempting is:

Workflow variables: Reviewers, TempReviewers

  1. Query Reviewers list where portfolio= package portfolio (in this case Peanuts) store value in Reviewers
  2. Query Approvers list where portfolio= package portfolio (in this case Peanuts) store value in TempReviewers
  3. For each item in TempReviewers use collection operation Add current item to Reviewers
  4. Collection operation de-duplicate Reviewers store results in Reviewers
  5. Set field Value on Package, field Reviewers = ?????

I put ???? because my workflow variables aren't even options here.  I see that there is another Nintex option to set field value = list lookup, but I don't see an option to source from more than one list and I would guess that two set field operations in succession would overwrite rather than append. (the inline Help doesn't really specify).

Any ideas on how to approach are most welcome.

Cartoonly Yours,

Erin

Labels: (2)
0 Kudos
Reply
2 Replies
nderiley
Nintex Newbie

Re: How can I aggregate list values into 1 variable?

Jump to solution

Alrighty, so I found this thread

Workaround person or group field one value problem Using Nintex Workflow 2010 | SharePoint Lady

I didn't do exactly what this thread suggested but new new step 5 is

  • Collection operation to join my Reviewers Workflow variable into a new Users workflow variable that is a Person or Group
  • Set Field = new Users workflow variable

My first test worked ok I think, I'll keep hammering at it

0 Kudos
Reply
glenda
Nintex Newbie

Re: How can I aggregate list values into 1 variable?

Jump to solution

Erin,

Why don't you store your information in a variable (e.g. from item 1 first), then also store the information of your second item in the same variable?

1. Lookup some information, store information in variable A

2. Lookup your other information, store information in variable B (you do not want to overwrite the information of variable A)

3. Use the a set a variable action and set variable A to be: "{WorkflowVariable: variable A}{WorkflowVariable:variable B}". This way you merge the information of your two variables.

I'm not completely sure of your set-up so the steps above are merely indicative

Goodluck,

Glenda

0 Kudos
Reply