2

I have a SharePoint 2013 + Workflow Manager 1.0 installation that is using a "wait for field change" in a workflow.

The workflow that has problems is "waiting for" a checkbox Yes/No field to change to Yes, but when it does change, it just ignores the changes. No errors... it just silently ignores the change

If on the same server I create another workflow but I use the legacy 2010 platform mode, the "wait for field change" on the Yes/No field works fine.

After many tests, a friend discovered that in 2013 platform mode (the mode that uses the Workflow Manager 1.0) while it does fail with Yes/No field, it works correctly for numeric fields.

We now believe it might be a localization problem (the English SharePoint 2013 & the Workflow Manager 1.0 are installed on top of a Spanish version of Windows). The Spanish language pack is not installed... and since the legacy 2010 workflow mode works correctly we now are thinking that Workflow Manager 1.0 has some kind of bug when running under Windows that is not in English...

Anyone knows how to fix this? Should the language pack fix it? (since we are already beyond the deadline, we do not want to waste time installing the language pack for SharePoint if we are not sure is not going to help...)

(why there is no tag for Workflow Manager? No one here has used it yet? )

Update: We installed the Workflow manager following these instructions: http://technet.microsoft.com/en-us/library/jj906604.aspx, but I am seeing now that the download from here: http://www.microsoft.com/en-us/download/details.aspx?id=35375 is different depending on the language...

We reversed our logic so that we are now waiting for "a checkbox Yes/No field to change to No" (because No is the same in Spanish and in English) but it did not work...

So I guess until someone finds out what is happening we are going to need to avoid checkboxes and use numeric fields (or multiple choice fields)

We do have another server where everything is in English and checkbox waiting seem to be working fine there...

Another Update: We changed the field type from checkbox to choice (and added the choices Yes/No). Then opened the workflow designer... and instead of showing "Yes" as it did when it was a checkbox... or "Yes" since one of the choices is "Yes"... it now shows... "True".

¿What is happening?

3
  • I don't have the tools in front of me to check myself, but does the designer require you to explicitly select "Yes" and "No" as the wait to change to values? In code behind (I'm a developer) I kind of recall seeing interesting behavior with these types of fields and you may want to consider trying things like TRUE/FALSE true/false True/False or 0 and 1 if you are able to provide your own value. Jul 11, 2013 at 17:52
  • @ToddersLegrande Yes, the designer requires me to explicitly select "Yes" and "No" as the wait to change to values
    – Luxspes
    Jul 11, 2013 at 18:04
  • Ah that's unfortunate then. Nevermind! :) Jul 11, 2013 at 18:06

3 Answers 3

0

I wonder if this is what you are experiencing. I saw it in a Lynda.com tutorial. http://www.lynda.com/SharePoint-tutorials/SharePoint-Designer-2013-Custom-Workflows/144025-2.html

"There are different workflow configurations for SharePoint 2013; some use the Workflow Manager 1.0, which does not appropriately handle changes to Boolean (Yes/No) columns in workflows. The fix is to change any columns with the Yes/No data type used as workflow triggers to the Number data type."

FIX:

  1. Modify the data type of the AreaCalc, HRCalc, and FinanceCalc columns (which currently use the Yes/No data type) to Number.

  2. Set the default value of each Calc column to 0.

  3. Modify the calculations of these columns using an IF function to assign 0 to No (False) and 1 to Yes (True). For AreaCalc, the formula would be: =IF(ISBLANK(Area Approval),0,1)

  4. In the Wait For Field Change in Current Item workflow actions, modify the conditions in the workflow to trigger based value of the Calc field changing to 1, for example, AreaCalc = 1.

After making these changes, test your workflow again.

NOTES:

You could choose any number values you wish, however, using 0 for False and 1 for True are standard and therefor make your workflow a bit easier to understand.

If you experienced the described behavior in your workflow, you may wish to avoid using the True/False data type while you're designing custom lists for your organization.

0

Why not make the field a CHOICE field with two options, YES and NO.

I general the yes/no field type is, as very expertly explained here, "not your friend". Because in it's core it is a field of type Boolean (1 or 0, ON or OFF), programmatically you can retrieve the data value with either SPFieldBoolean.GetFieldValueAsText or SPFieldBoolean.GetFieldValue. The latter of which is actually typed as a Boolean, the former returns a localized text version of the field value.

And they are both used within SharePoint itself too (like what the linked article sats about CQWP etc).

If you developed the field yourself, you could resourceencode the CHOICE values btw:

<CHOICES>
     <CHOICE>$Resources:core,_No;</CHOICE>
     <CHOICE>$Resources:core,_Yes;</CHOICE>
<CHOICES>
0

This is why I prefer not to use checkbox yes/no field instead I use a text field and pass yes/no or 'true' value once it is checked. You don't have to add a delay in your workflow you rather add a condition in your workflow to take an action when your checkbox value is 'true'. Make sure to run/launch the workflow when an item is modified.

Your Answer

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

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