Domanda

Hi,

I'm just starting with workflows, and it seems that my first need isn't the less complicated...

I have 3 Lists.
- Book list
- Author list
- AuthBook list

As you can guess, The first one contains books (Title, Edition, Year,...) and the second one contains authors (First Name, Last Name). The third is like a database table for an n-n-relationship. It contains Book id and Author id. It also contains the order of authors.

what I want :

I'd like to have a nice display for my book list instead of columns. Something like :

My book title
Edition, Year
Authors

The problem comes with the author thing...
To get my authors, I need to go through two other lists.

what I've found :

I thought about calculated field, but it cannot be used between lists.
Some told about having a lookup field : Sharepoint: Calculated column based on another list
In my case, I cannot do this because I may have more than one author.

So, the only solution I can imagine would use a list workflow.
I want to start a workflow when AuthBook list is modified. Then, I'd like to get all authors for the book of modified item and concat concerned authors names to fill a column in book list.

example :
I add author 5 to book 1 at the second place
get all authors of book 1 (in AuthBook list)
concat their names in the right order (in Author list) insert this value in book 1 for display (in Book list)

Now comes the real question :

It seems I can declare local variable but each one contains only one value : http://office.microsoft.com/en-us/sharepoint-designer-help/use-variables-in-workflows-HA010240415.aspx

So I can declare a variable for my author list. But when I want to query the AuthBook list to get all authors of my book, It's said that only the first result will be taken. How can I get all my authors ?

I'm using Sharepoint Designer, but if using code is easier, I can do it

More about this : multiple records in sharepoint workflow I've found this one, but I cannot use it because I don't know the number of authors. I may use a more complete query on list (select item where ID is ... and authOrder is ...) but I cannot figure out how to use several condition on a query.

È stato utile?

Soluzione

The only solution I've found for this is to use a Visual Studio Workflow. Possibilities are much bigger with them and I coded the function I needed.

It don't seems to be possible with SPD to do this though all my researchs.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top