This is the choice field which customizes choice to drop down using jquery ,

enter image description here SharePoint 2013 Designer Workflow gets canceled when I run it. It's giving me this error:

System.InvalidCastException: The value 'd/results(0)/Users' cannot be read as type 'String'. at Microsoft.Activities.GetDynamicValueProperty`1.CheckedRead(String propertyName, DynamicItem value) at Microsoft.Activities.GetDynamicValueProperty`1.Execute(CodeActivityContext context) at System.Activities.CodeActivity`1.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

  • Off the top of my head, I'd say that "Users", since it's plural, implies a multi-user field, so it would be returning either a Collection of some sort (string user names? int user IDs?), or possibly another Dynamic Value, if it has more complex/full user objects. – Dylan Cristy Aug 26 '16 at 15:23
  • We need more information. What does your workflow do? Is there a custom initiation form? What type of field is Users? – Erin L Aug 26 '16 at 15:35
  • Its list form, type of users is choice. please check attachment. – Admin Aug 29 '16 at 6:30

enter image description here

to get a value of sharepoint group you need to declare it as Int.

|improve this answer|||||
  • Thank you for reply but Users type is choice not group. – Admin Aug 29 '16 at 6:43
  • what kind of users you have on your choice field?? single user or group of users?? – Melad Batta Aug 29 '16 at 6:51
  • users can be select multiple users based on check box please check attachment updated questions. – Admin Aug 29 '16 at 6:55
  • Thank you Milad .. I got answer, return type of users set Choices – Admin Aug 29 '16 at 11:35
  • Awesome to have it work :) – Melad Batta Aug 29 '16 at 11:51

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.