Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAML query hides rich text fields? #72

Open
Palumbob opened this issue May 17, 2018 · 6 comments
Open

CAML query hides rich text fields? #72

Palumbob opened this issue May 17, 2018 · 6 comments

Comments

@Palumbob
Copy link

When i console log my data from getting list data from a list without a query, all fields show up. When i add a query to my call, it hides any rich text fields i have?

HELP

@sympmarc
Copy link
Owner

Can you post the different calls you're making? What you're describing doesn't really make sense.

@Palumbob
Copy link
Author

Palumbob commented May 17, 2018

var projectsList = $().SPServices.SPGetListItemsJson({
listName: "Input for Success Stories",
debug: false
});

When i use this call above, without the query, i get all the list items without issue and all the fields in the list.

When i use this call above, with the query, i get the list item i want (ID = 4), but the rich text fields do not show up.

I use spservices all the time, this is throwing me for a loop.

@sympmarc
Copy link
Owner

It's hard for me to know what to tell you without seeing the query you're sending. The call above will retrieve all items in the list using the default view for the list. You would only be be seeing all the columns if you have all of them displayed in the default view. (I recommend using ViewFields, as someone - most likely you! - could change the default view and you'd start getting different results.) Your query could be changing what is retrieved somehow.

@Palumbob
Copy link
Author

query = CAMLQuery: "<Query><Where><Eq><FieldRef Name='ID' /><Value Type='Number'>4</Value></Eq></Where></Query>",
my caml query is correct, i am only returning the one list item. but its odd because the response strips out the rich text fields.

I tested the same call on the out of the box announcement list and it works as it should, it doesn't hide the body column (rich text). but it hides my rich text fields in my custom list?!?!?

as i stated, i use (and LOVE) spservices so this one oddity is confusing me!

so to be clear, when i use the above query, i get the data ( im console logging the response), but in my array, im missing all rich text fields. (this is for a custom list).

works fine on the announcements

@purtuga
Copy link
Collaborator

purtuga commented May 18, 2018 via email

@sympmarc
Copy link
Owner

So are the Rich Text column values being return empty or not being returned at all? If it's the latter, I'd suggested adding something like:

CAMLViewFields: "<ViewFields><FieldRef Name='MyRichTextColumn' /></ViewFields>",

to your call. As @purtuga and I have mentioned, it's always best to use ViewFields to request the columns you want, anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants