2017-02-03 1 views
1

SharePoint에서 join 쿼리를 사용합니다. 하지만 조회 목록에서 가치를 얻을 때 오류가있는 것처럼 보입니다. 문서 라이브러리 유형으로 여기 "Microsoft.SharePoint.Client.ServerException"값이 예상 된 범위 내에 있지 않습니다.

내 디자인

  • 문서는 아이디를

    Id | DocLeafRef 
    ---+------------- 
    1 | Document A 
    2 | Document B 
    
  • 활동 목록이 외래 키 'e8_document'는 문서 ID

    에 해당 참조가
    Id | e8_document | Name 
    ---+-------------+----------- 
    1 | 1   | Activity A 
    2 | 1   | Activity B 
    3 | 1   | Activity C 
    4 | 2   | Activity D 
    

결과는 다음과 같습니다.

Id | e8_document | Name  | DocLeafRef 
---+-------------+-------------------------- 
1 | 1   | Activity A | Document A 
2 | 1   | Activity B | Document A 
3 | 1   | Activity C | Document A 
4 | 2   | Activity D | Document B 

제 질문에 도움이 될만한 사람이 있습니까? 여기 내 쿼리

<View> 
    <ViewFields> 
    <FieldRef Name = 'DocLeafRef'/> 
    <FieldRef Name = 'ID'/> 
    <FieldRef Name = 'e8_document'/> 
    <FieldRef Name = 'Title'/> 
    <FieldRef Name = 'Author'/> 
    <FieldRef Name = 'Created'/> 
    </ViewFields> 
    <Joins> 
    <Join Type = 'INNER' ListAlias = 'Documents'> 
     <Eq> 
     <FieldRef Name ='e8_document' RefType = 'Id'/> 
     <FieldRef Name ='ID' List ='Documents'/> 
     </Eq> 
    </Join> 
    </Joins> 
    <ProjectedFields> 
    <Field ShowField ='FileLeafRef' Type ='Lookup' Name ='DocLeafRef' List ='Documents'/> 
    </ProjectedFields> 
    <Query> 
    <Where> 
     <Eq> 
      <FieldRef Name='e8_caseId'></FieldRef> 
      <Value Type = 'Number'>23</Value> 
     </Eq> 
    </Where> 
    </Query> 
</View> 

입니다 그리고 여기 가능성이 문제가 FileLeafRef가 예상 필드에서 사용할 수있는 필드 유형 중 하나가 아닌 것입니다 제외 Value does not fall within the expected range

답변

1

입니다.

here 설명서를 참조하십시오. 필드의

만 다음과 같은 유형이 ProjectedFields 요소에 포함 할 수 있습니다 : 계산 •

• ContentTypeId

• 카운터

환율 • (일반 텍스트로 처리)

• DateTime

• 가이 드

정수 •

• 주 (한 줄에 한함)

• 텍스트

+0

ProjectedFields가하는 다른 필드 유형을 얻을 수있는 방법 • UniqueId (조회 유형) 및 FileLeafRef (파일 유형)와 같이 지원되지 않습니까? –

+1

워크 플로를 사용하여 원하는 필드 값을 텍스트 필드에 자동으로 복사 한 다음 해당 텍스트 필드를 투영법에 표시 할 수 있습니다. – Thriggle

+0

예제가 있습니까? –

관련 문제