Space in field name causes problem in CAML query


#1

Hi, I’m creating a workflow for a list and need to use the action “Get items by CAML” query. Unfortunately one of the fields I need to get has a space in the field name and this makes the workflow crash with the message:
Exception: One or more field types are not installed properly. Go to the list settings page to delete these fields

The issue is with the CAML query. I’ve tried using the field name as it is displayed in the url: Panel%5Fx0020%5FDate but this doesn’t make any difference.

Does anyone know how to cope with this?
It works fine on a field without a space in the name, but I need it to work on this one!


#2

Try creating a variable with a friendly name and output the required to the variable, then call the variable instead of the list name in the CAML query.

  1. Create local variable “friendlyname” as type string.

  2. Set Variable: friendlyname to Current item:Panel Date


#3

Hi @aliceoneill,

Looks like you use incorrect internal name for your field. Try to replace %5F by _. Thus, your internal name will be Panel_x0020_Date. That is how SharePoint encodes it.

Please read this article for more information about getting correct internal name for a SharePoint field.


#4

Thank you both for your very helpful suggestions. I’ve gone with Anton’s response, just because it seemed a little simpler, but useful to have two different methods. It now works. Hooray!