sitecore
  • query-analyzer
  • sitecore-workflow
  • 2013-03-12 4 views 0 likes 
    0

    Sitecore 쿼리 쿼리 분석기를 통해 Sitecore 쿼리 언어를 사용하여 현재 상태를 유지하면서 항목을 새 워크 플로로 업데이트하려고합니다. 나는 현재 가지고있다 :Sitecore 쿼리 언어 : 업데이트 + 위치

    update set @#__Workflow state# = "--GUID of the workflow state--" from //*[@@id='--GUID of the parent Item--']/* 
    

    이것은 작동한다. 내가하고 싶은 일은 인데 여기에 성명이 포함되어 있으므로 워크 플로우를 전환하면서 초안/승인 대기/승인 상태를 유지할 수 있습니다.

    update set @#__Workflow state# = "--GUID of the DRAFT workflow state--" from //*[@@id='--GUID of the parent Item--']/* where @#__Workflow state# = "--GUID of the original DRAFT workflow state--"; 
    update set @#__Workflow state# = "--GUID of the APPROVED workflow state--" from //*[@@id='--GUID of the parent Item--']/* where @#__Workflow state# = "--GUID of the original APPROVED workflow state--"; 
    

    그러나 이것은 작동하지 않습니다. 에 구문 문제가 있습니까? 절 또는 여기서은 Sitecore Query Language에서 함께 사용하지 마십시오.

    답변

    1

    "Where 절"은 쿼리 언어에서 작동하지 않습니다.

    사용 사용해야/* [@의 fieldName = "값"이 같은 항목을 선택합니다 :

    update set @#__Workflow state# = "--GUID of the DRAFT workflow state--" from //*[@@id='--GUID of the parent Item--']/*[@#__Workflow state# = "--GUID of the original DRAFT workflow state--"]; 
    
    update set @#__Workflow state# = "--GUID of the APPROVED workflow state--" from //*[@@id='--GUID of the parent Item--']/*[@#__Workflow state# = "--GUID of the original APPROVED workflow state--"]; 
    

     관련 문제

    • 관련 문제 없음^_^