SharePoint Designer Workflow Desturi Action — Kuhusu uchunguzi <Shamba Tie Designer Aina =”StringBuilder” … />

Tu uchunguzi wa haraka kwamba kuna tofauti muhimu sana kati ya ufafanuzi hizi mbili:

<FieldBind Field="InParam1" DesignerType="StringBuilder" Id="2" Text="Input parameter #1"/>

dhidi ya:

<FieldBind Field="InParam1" Id="2" Text="Input parameter #1"/>

inaonyesha ya kwanza kama hii katika SPD:

picha

wakati mwisho inaonyesha kama hii:

picha

I’m not sure how helpful these screen shots are but I put in the effort to make them so you have to view them 🙂

The observation is this: StringBuilder allows you to build a string (wazi) by mixing together string literals and workflow data (via the "Add Lookup" button in the lower left-hand corner). When you use the Add Lookup button, it inserts a token in the form "[%token%]". When SharePoint invokes your custom action, (C# code in my case), SharePoint passes the token itself, not the value of the token. If you use the default designer type (the second type), SharePoint expands the token and passes actual value of the token to your action.

StringBuilder = BAD, default designer type = GOOD.

Bila shaka, that’s not what I really mean. Just don’t try and pass a parameter to your custom action when the designer type = StringBuilder. Use the default designer type and chain a StringBuilder to it up front if you need to build complex strings in your workflow (which incidentally is exactly what one does to create a dynamic subject for the email action, but that’s a subject for another blog entry, har har).

<mwisho />

Wazo moja juu ya "SharePoint Designer Workflow Desturi Action — Kuhusu uchunguzi <Shamba Tie Designer Aina =”StringBuilder” … />

Kuondoka Reply

Anwani yako si kuchapishwa. Mashamba required ni alama *