1

I have taken calculated field as a data field number for adding weekdays excluding saturday and sunday.

It is working good. But the problem is in SharePoint Designer I have triggered action send an email there I have to send to the employee after submitting request. The error is

while triggering No. of days is coming like thet float # how to remove that? enter image description here But in Return field as it is taking default as a String ? How to enable that? Can any one explain this issue? enter image description here

  • 1
    Try creating workflow variable return field as number. and than instead of calling calling calculated field in mail body, call workflow variable. – Danilo Mar 2 '16 at 14:20
0

It's SharePoint's CAML queries' way of working with calculated fields. This problem is described in https://deannaschneider.wordpress.com/2012/07/06/associated-calculated-columns-in-reusable-workflows-sp2010/ and "float;#22.0000000000000" Number Returned From CAML Query

The straightforward workaround is to re-implement same calculations in the workflow once again.

Or you can create a workflow variable tempVar and set it's value to CurrentItem:No. of Days (as string), then use some Utility actions to get that 22 out of the string. Something like Extract Substring of String from Index with Length with args of tempVar, 7 and (the position of . char minus 7) will work. To find the position of ., use Find Substring in String. This will cut out 22 (basically, all chars between # and .) and put it in tempVar, so you can use it in emails.

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.