AnsweredAssumed Answered

Variables not applied properly in Query List CAML

Question asked by soaringpillager on Sep 19, 2017
Latest reply on Nov 16, 2017 by rashmikoti

I created a SharePoint form that prompts users the following:

  • Name of List to be accessed
  • Name of Column to be affected on above list
  • Name of List to collect information to be processed


In the processing I did a little fixing to the inputs such as trim spaces, and replace spaces with "_x0020_" so that it can pull the data properly using   Query List > CAML

to applied the following:


<List Title="{ItemProperty:Assignment_x0020_List_x0020_Name}" />
<FieldRef Name="ID" />
<FieldRef Name='{WorkflowVariable:colname_fix}' />


The problem I am having is that FieldRef accessing the variable flakes out and gives me this error

Failed to query list data. One or more field types are not installed properly. Go to the list settings page to delete these fields.


although when printing the variable "colname_fix" matches correctly to the column name.

In testing if I replace  workflow variable with <FieldRef Name='X_x0020_X' /> where its the exact output of what the variable outputs from the user input field it works fine...but the problem is I want it to be functional on fixing user inputs such as the spaces users wont know about the "_x0020_" for spaces.  If I statically enter "X X" it will give similar error but will work fine if I do "X_x0020_X", which is the same output as the processed one in the variable above, so does CAML have issues with WorkflowVariables?



My issue is if the VARIABLE == Column Name  including the adding of _x00200_ where there are spaces why is it giving me this error.


Is there another way to pull in data that a user inputs into a input field and apply it to a column name? or is there something I am missing?