2

I have another problem concerning the count-related column-value of SP2010 in a workflow(see also: How to get count related Lookup value programmatically? ).

my use-case: I have a column "actual attendees" in a custom list named "Events". It is a count-related lookup-column for another lookup-column in a list called "attendees". Now I want to check this column in a workflow like this:

if (actual attendees > minimal attendees)
do this
else if (actual attendees <= ...)
do that

The Problem: As mentioned in the referenced thread, the calculated column-value returns a string-value (btw: I think this is a weird concept, Microsoft. Grrr.). Programmatically I solved this misconception by using Convert.ToInt32..., but I do sort of "wait for date, then check attendee number, then send e-mail" in my workflow, So I think I can't use a programmatical solution without doing lots of code (or to be short: I need a workflow for this, do I?)

Now in a SP Designer workflow, sadly this conversion seems to be not possible for me. I tried

//Attendees is a Number-Variable, tried with string, too, but not working too.
Set Variable:Attendees to Current_Item:actual Attendees

but when instantiating the workflow I get the error (using german version here, so I try my best to translate it):

Coercion Failed: Unable to transform the input lookup data into the requested type.

I'm out of ideas for this and I hope someone could help me out.

Best regards, Dominik

1 Answer 1

1

Okay, it was my fault. I'd set the return type of the count-related lookup-value to Lookupvalue (as Number) (translated, using german version here). It works if you'll use 'double' as return value for the count-related returnvalue. Just seemed logical to me to use the other one, but... hey, works! ;)

Greetings and sorry for taking your time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.