I have a list that I use that functions similarly to a web.config in the sense of dynamic control values that would that changes settings for workflows on the site that it is maintaining. This prevents me from having to make changes to the workflows directly and also gives users the ability to make changes to workflow controls on the fly.
Each item in the list is valued by a column named "key" and then the value of that key set to the column name "value". Both columns are string data types.
I have a workflow that uses a "Pause for Duration control". Inside the configuration I use the insert reference and set the appropriate key values for Days, hours and minutes based on the settings list using a query control that pulls the various values from the list. It stores these values as a text data type. These values are accepted by the control with no problem. Whenever I execute the workflow I receive the following error message from SharePoint:
Coercion Failed: Unable to transform the input lookup data into the requested type.
I assume this is because the value for the "pause for" is looking for a number instead of a text but I see no way to convert the string to a number through a function.
- Is this possible to do?
- Shouldn't this control accept a text value and convert it appropriately?
I have validated the values of the variables are being returned as text value numbers "3" "0" "0" (days, hours, minutes) and each are entered in the appropriate form fields labeled as such.
A side note:
The help section for this particular function does not outline the expected data type:
Options within this action
By default, the delay period will be set to 5 minutes.
Set the delay period
- Minutes (defaulted to 5)
Manually enter values or use Insert Reference for dynamic values.
This would be very helpful to add here.