????? ??????? ?????? ??? ?? ??? ????? ????? ?? ??????? ???? ????? ??? ????? ?????/?????? ?? InfoPath

?????? ????????? ?????? ?????????
???? ???????: 892952 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

????? ???

???? ??? ??????? ????? ??????? ???????? ????? ??? ??? ????????? ?? ??????? ???? ????? ??? ????? ?????/?????? ?? Microsoft Office InfoPath. ????? ??????? ??? ???????? ???????? ??? ??? ??????? ???????? ???? ?? ????? ??? ???? ????? ???????? ??? ????? ??? ??? ?????? ???????.

??????? ????

???? Microsoft ??????? ???????? ??? ??? ?? ???? ??????? ?? ?? ?????. ??? ????? ???? ?? ????? ??? ???????? ??????? ?????? ???????? ?? ???????? ???? ????. ????? ??? ??????? ???? ?????? ?? ??? ??????? ???? ??? ????? ?? ??????? ???? ??? ????????? ?????? ?????? ?????????. ???? ??????? ????? ??? Microsoft ??? ????? ????? ???? ???? ?? ?????? ?????? ??? ??????? ?????? ????? ?????? ?? ????? ??????? ?????? ??????? ?????. ?????? ????? ????? ????? ?????/?????? ??? ??? ??? ??????? ???????? ??????? ??? ??? ?????? ??????? ???? ??????? ???????:
  1. ??? ????? InfoPath ?? ?? ???? ????? ???? ????. ?????? ????? ???? ??????? ???????:

    ?????? ??? InfoPath 2007
    1. ?? ????? ?????? ?? ???? ?????? ????? ????? ???? ??? ????? "???? ?????".
    2. ?? ????? "???? ?????" ???? ???? ??? ???? ?? ???? ??? ?????.
    ?????? ??? InfoPath 2003
    1. ?? ????? ?????? ?? ???? ?????? ????? ????? ???? ??? ????? ?????.
    2. ?? ????? ??????? ???? ??? ????? ???? ????.
  2. ????? ?????? ??????. ?????? ????? ???? ??????? ???????:

    ?????? ??? InfoPath 2007
    1. ?? ??????? ????? ? ???? ??? ???? ????.
    2. ????? ??? ??????? ??? 2 ?? ???? ??? ?????.
    3. ??? ?????? ??????? b ?????? ???? ???? ???.
    ?????? ??? InfoPath 2003
    1. ?? ??????? ????? ? ???? ??? ????? ???? ??????.
    2. ??? ????? ????? ?????? ?? ??? ?????? ????? ?????? ? ???? ??? ???? ????.
    3. ????? ??? ??????? ??? 2 ?? ???? ??? ?????.
    4. ??? ?????? b ??? ?????? c ?????? ???? ???? ???.
  3. ?? ?????? ???????? ???? ?? ?? ?? ??? ?????? ?????? ??? ??? ???????? ??? ??????? ??????? ???????. ?????? ????? ???? ??????? ???????:
    1. ?? ??????? ???? ???? ??? ???? ????????.
    2. ?? ??? ?????? ???? ???????? ? ?? ?????? group1.
    3. ???? ??? ?????? ?????? ??? group2 ??? ?? ???? ??? ???? ????.
    4. ?? ??? ?????? ???? ???????? ? ?? ?????? group3.
    5. ???? ??? ?????? ?????? ??? group4 ??? ?? ???? ??? ???? ????.
  4. ????? ????? ?????/?????? ??? ?????? ???? ??? ??????? ?? ?????? 3. ?????? ????? ???? ??????? ???????:
    1. ???? ??? ?????? ?????? ??? ?????? ????? ??? ?? ???? ??? ????? ?????? ??????.

      ?????? ??? ?????? ?? ?????? ?????? ?? ???? ???????.
    2. ?? ???? ?????? ????? ?????? ?????? ???? ??? ????? ??????? ?????/??????.
    3. ??? ??????? ???????/???????? ? ???? ??? ????? ???????.
    4. ?? ?????? ?????? ??????? ???? Master1 ??? ?? ???? ??? ?????.
    5. ???? ??? ?????? ?????? ??? ?????? ?????? ?? ???? ??? ????? ?????? ??????.

      ?????? ??? ?????? ?? ?????? ?????? ?? ???? ???????.
    6. ?? ???? ?????? ????? ?????? ?????? ???? ??? ????? ??????? ?????/??????.
    7. ??? ??????? ???????/???????? ? ???? ??? ????? ???????.
    8. ?? ???? "???????? ??????? ???????" ? ??? Master1.
    9. ??? ?????? ???????? ?????????? ? ???? ??? ??? ????? ???????.
    10. ???? ??? ??? ????? XPath ??? ???? ?????? ????? ??????? (?????) ?? ???? ??? field1.
    11. ???? ??? ??? ????? XPath ??? ???? ?????? ????? ??????? (??????) ? ???? ??? field3 ?? ???? ??? ?????.
  5. ????? ??? ???? ??? ????????? ?? ????? OnAfterChange ???? ??????? ?? ?????? "??????". ?????? ????? ???? ??????? ???????:

    ?????? ??? InfoPath 2007
    1. ?? ??? ?????? ???? ????????? ???? ??? ?????? ?????? ??? field1 ?? group2 ???? ??? ??????? ??? ?? ???? ??? ??? ??? ??? ???????.
    2. ?? ?????? ???????? ???????? ??????? ??? ???? ??????? ???????? ?????.

      ?????? ?????? ??????? ??????? ????? ???????? ??????? ?????? ????? ????????? ?? ?????? ???? ???? ?????????. msoxd_my_field1::OnAfterChange(eventObj) ??????
      function msoxd_my_field1::OnAfterChange(eventObj)
      {
       // Write code here to restore the global state.
       
       if (eventObj.IsUndoRedo)
       {
        // An undo operation or a redo operation has occurred, and the DOM is read-only.
        return;
       }
       
       //Delete corresponding details if a delete operation has occurred on source group2.
       if(eventObj.Operation == "Delete" && eventObj.Source.nodeName == "my:group2")
       {
        //Block the view update feature to improve performance.
        thisXDocument.View.DisableAutoUpdate();
        
        //Obtain the  value of the keyfield of that row that you want to delete (set as field1 in Designer).
        var nodeKeyFieldMaster = eventObj.Source.selectSingleNode("my:field1");
                
        //Set the selection on all nodes in Detail.
        var nodesDetail = XDocument.DOM.selectNodes("/my:myFields/my:group3/my:group4");
       
        //View each row in Detail, and then delete the row if the key field in the detail matches the key field in the master.
        for (i=0; i< nodesDetail.length; i++)
        {
         //Obtain the row.
         var row = nodesDetail.item(i);
         
         //Obtain the  value of the keyfield for the current row  (set as field3 in Designer).
         var nodeKeyFieldDetail = row.selectSingleNode("my:field3");
       
         //Delete the row if the keyfield in the detail matches the keyfield of the deleted row in the master.
         if(nodeKeyFieldDetail.text == nodeKeyFieldMaster.text)
         {
          row.parentNode.removeChild(row); 
         }
      
        //Re-enable the view update.
        thisXDocument.View.EnableAutoUpdate();
      
        }
       } 
      }
      
    3. ?? ??????? ???? ???? ??? ???.
    4. ?? ??????? ???? ???? ??? "?????".
    ?????? ??? InfoPath 2003
    1. ?? ??? ?????? ???? ????????? ???? ??? ?????? ?????? ??? field1 ?? group2 ??? ?? ???? ??? ?????.
    2. ?? ???? ?????? ????? ????? ?? ???????? ? ???? ??? ????? ??????? ?????? "??????? ???????".
    3. ?? ??????? ????? ? ???? ??? OnAfterChange ?? ???? ??? ?????.
    4. ?? ?????? ???????? ???????? ??????? ??? ???? ??????? ???????? ?????.

      ?????? ?????? ??????? ??????? ????? ???????? ??????? ?????? ????? ????????? ?? ?????? ???? ???? ?????????. msoxd_my_field1::OnAfterChange(eventObj) ??????
      function msoxd_my_field1::OnAfterChange(eventObj)
      {
       // Write code here to restore the global state.
       
       if (eventObj.IsUndoRedo)
       {
        // An undo operation or a redo operation has occurred, and the DOM is read-only.
        return;
       }
       
       //Delete corresponding details if a delete operation has occurred on source group2.
       if(eventObj.Operation == "Delete" && eventObj.Source.nodeName == "my:group2")
       {
        //Block the view update feature to improve performance.
        thisXDocument.View.DisableAutoUpdate();
        
        //Obtain the  value of the keyfield of that row that you want to delete (set as field1 in Designer).
        var nodeKeyFieldMaster = eventObj.Source.selectSingleNode("my:field1");
                
        //Set the selection on all nodes in Detail.
        var nodesDetail = XDocument.DOM.selectNodes("/my:myFields/my:group3/my:group4");
       
        //View each row in Detail, and then delete the row if the key field in the detail matches the key field in the master.
        for (i=0; i< nodesDetail.length; i++)
        {
         //Obtain the row.
         var row = nodesDetail.item(i);
         
         //Obtain the  value of the keyfield for the current row  (set as field3 in Designer).
         var nodeKeyFieldDetail = row.selectSingleNode("my:field3");
       
         //Delete the row if the keyfield in the detail matches the keyfield of the deleted row in the master.
         if(nodeKeyFieldDetail.text == nodeKeyFieldMaster.text)
         {
          row.parentNode.removeChild(row); 
         }
      
        //Re-enable the view update.
        thisXDocument.View.EnableAutoUpdate();
      
        }
       } 
      }
      
    5. ?? ??????? ???? ???? ??? ????? ?????? ???? ???????.
    6. ???? ??? ????? ?????? ???? ?????? ????? ????? ?? ????????.

?????? ??????? ??? ????? works.To ??? ?????? ????, ???? ??????? ???????:
  1. ?????? ??? InfoPath 2007

    ?? ??????? ???? ??? ??? ?????? ?? ???? ??? ?????.

    ?????? ??? InfoPath 2003

    ?? ??????? ???? ??? ??? ????? ?????? ? ?? ???? ??? ???????
  2. ????? ??? ????? ???????? ?? ?????? ????? ?? ???????. ??? ?????? ?? ??????? ??????. ?????? ????? ???? ??????? ???????:
    1. ?? ?????? ????? ?? ???? ????? ???? Test1.
    2. ?? ?????? ?????? ?? ???? ????? ???? Master1.
    3. ??? ???? ??? ??? ??????? ???? ???????? ? ???? ??? "????? ????" ????? ?? ???? ??? ?????? ?????.
    4. ?? ?????? ????? ?? ???? ?????? ???? Test2.
    5. ?? ?????? ?????? ?? ???? ?????? ???? Master2.
    6. ??? ??? ???? ?? ????? ???? ?????? ??? ??????? ?? 2 c ??? 2e.
  3. ????? ??? ????? ???????? ??? ?????? ?????? ?? ???????. ??? ?????? ?? ?????? ??????. ?????? ????? ???? ??????? ???????:
    1. ?? ?????? ????? ?? ???? ????? ???? Test1.
    2. ?? ?????? ?????? ?? ???? ????? ???? Detail1.
    3. ??? ???? ??? ??? ??????? ???? ???????? ? ???? ??? "????? ????" ????? ?? ???? ??? ?????? ??????.
    4. ?? ?????? ????? ?? ???? ?????? ???? Test2.
    5. ?? ?????? ?????? ?? ???? ?????? ???? Detail2.
    6. ??? ??? ???? ?? ????? ???? ?????? ??? ??????? ?? 2 c ??? 2e.
  4. ?????? ??????? ?????/??????. ??? ?? ?? ?? ???? ????? ???? ?????. ???? ?????? ?????? ??? ?????? ?? ?????? ?????? ???? ??? ??? ?????? ?? ?????? ????? ?? ???? ???? ?? ??????.
  5. ??? ?? ?? ??????? ??????. ?????? ????? ???? ??????? ???????:
    1. ?? ???? ????? ??? ???? ?????? ??? ????? ?????? ????? ??? "Test2".
    2. ???? ??? ????? ??????? ????? ???? ?????? ?? ???? ??? ????? group2.

      ?????? ??? ???????? ??? ?????? ???? ????? ??? ??? ???? ?? ?????? ????? ?? ?????? ?????? ?????? ????? ???????? ????????. ??? ???? ??????? ??? ??? "Test2".

???????

???? ???????: 892952 - ????? ??? ??????: 11/????/1428 - ??????: 2.2
????? ???
  • Microsoft Office InfoPath 2003
  • Microsoft Office InfoPath 2003, Service Pack 1 (SP1)
  • Microsoft Office InfoPath 2007
????? ??????: 
kbmt kbxml kbcodesnippet kbcode kbprogramming kbhowto KB892952 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????892952

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com