I have a "Property" argument in a workflow. I need to access it and pass it's value to another activity.

enter image description here

It seems that I can't do this however. What am I missing?

I found this which seems to be relevant but I have no idea what they are talking about: https://stackoverflow.com/questions/17315336/how-do-you-read-properties-in-a-build-defintion-workflow-tfs-2010

I need to use a Property instead of an In/Out argument because of this question: Invoking an ActivityAction in a SharePoint workflow


You've almost got it... you have to write an expression in that condition that evaluates to TRUE/FALSE. So something like

testProp == 'something'

  • I've tried that. The question is about the "Property" argument type, which cannot be resolved from a workflow... The purpose of the screenshot was to show that it doesn't even appear in intellisense. Try it. Create a new SharePoint 2013 project, add a workflow. Add a new argument named testProp and set the direction to PROPERTY. Then try to access it from the workflow, from an IF statement or whatever.
    – David
    May 13 '14 at 10:09
  • Sorry, now I see what you're asking. Are you trying to pass a value into the workflow when it starts? If so, create it as an argument, not a property. May 13 '14 at 14:52
  • @AndewConnell Could you take a look at the last part of the question please? I've explained why I need to use a property rather than an argument in the linked question, but basically - a property which takes an ActivityAction is rendered by the designer and allows you to actually accept a whole activity as a parameter. An argument seems to not allow you to do that.
    – David
    May 14 '14 at 8:13
  • I don't think you can do what you're demonstrating in the initial question. Your custom activity has to return a value which must be bound to something like a BOOLEAN variable. You can't just throw that in the CONDITION part of the IF because activities don't have a single output, they have a name-value collection of IN/OUT arguments. So create an OUT argument on your activity that has the BOOL value result from your custom activity and THEN you could then use that in your IF condition. I'll comment on your other question... May 14 '14 at 13:34
  • I'm not sure if I understand. How I can access an argument of direction "PROPERTY" from within the workflow?? I do not need necessarily to access it from an IF statement. Let's say I need to access it in an assignment statement and want to assign the PROPERTY string to a workflow variable. Or let's say I need to write this PROPERTY argument to the workflow history. I know you can achieve this with an "IN" argument, but I'm not interested in that, but want to do the exact same thing with a "PROPERTY" argument. As a sidenote, what is the "Property" argument even used for then?
    – David
    May 14 '14 at 13:53

Your Answer

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

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