문제
SP2007/MOSS에서는 다음과 같은 단일 목록에 대해 CAML 쿼리를 실행해야합니다.
<Where>
<Or>
<Eq>
<FieldRef Name='URL' />
<Value Type='URL'>/path/item1.aspx</Value>
</Eq>
<Eq>
<FieldRef Name='URL' />
<Value Type='URL'>/path/item4.aspx</Value>
</Eq>
<Eq>
<FieldRef Name='URL' />
<Value Type='URL'>/path/item7.aspx</Value>
</Eq>
</Or>
</Where>
이것의 실질적인 결과는 내가 URL을 가지고있는 항목들을 splistitemcollection한다는 것입니다.
그러나 '하나 이상의 필드 유형이 제대로 설치되지 않은 오류가 발생합니다. 이 필드를 삭제하려면 목록 설정 페이지로 이동하십시오. '
목록의 모든 항목은 동일한 콘텐츠 유형입니다. SP 로그의 유일한 관련 오류는 동일한 메시지를 보여줍니다.
대답은이 특정 문제를 해결하지 못했지만 결국 맞았습니다 (또는 중첩되어야합니다). 문제는 내 필드 값 유형이 fileref 였다는 것입니다.
해결책
This error is almost always because your CAML query is incorrect. Have you tried formatting it like this:
<Where>
<Or>
<Eq>
<FieldRef Name='URL' />
<Value Type='URL'>/path/item1.aspx</Value>
</Eq>
<Or>
<Eq>
<FieldRef Name='URL' />
<Value Type='URL'>/path/item4.aspx</Value>
</Eq>
<Eq>
<FieldRef Name='URL' />
<Value Type='URL'>/path/item7.aspx</Value>
</Eq>
</Or>
</Or>
</Where>
I'm pretty sure you can only have two components in an Or or And branch.
제휴하지 않습니다 StackOverflow