$handle=MsgFrameOpen("", 0); $returnValue=MsgNextBlock($handle); //Get value from sub-block and check if correct blockname from XML $block_name=MsgBlockId($handle); if($block_name="Order_Manuell_row") { //Get number of fields in Order_Manuell_row block and initiate counter. $NoOfblockFields=MsgNumFields($handle); $NoOfBlockFields_I=1; //find field "ManualRow_Type" and extract value while (num($NoOfBlockFields_I)<=num($NoOfBlockFields)) { $field_id=MsgFieldId($handle, $NoOfBlockFields_I); if($field_id="ManualRow_type") { //Get value from field "ManualRow_type" $Type_value=MsgFieldValue($handle, $NoOfBlockFields_I); } $NoOfBlockFields_I++; } } //Check that the same block is examined while(num($returnValue)!=0 and $block_name!="Order_Row") { //Return value if next OrderRow or all OrderRows examined=0 $returnValue=MsgNextBlock($handle); //Get value from sub-block and check if correct block name from XML $block_name=MsgBlockID($handle); if($block_name="Order_Manuell_row") { //Get number of fields in Order_Manuell_row block and initiate counter. $NoOfblockFields=MsgNumFields($handle); $NoOfBlockFields_I=1; //find field "ManualRow_Type" and extract value while (num($NoOfBlockFields_I)<=num($NoOfBlockFields)) { $field_id=MsgFieldId($handle, $NoOfBlockFields_I); if($field_id="ManualRow_type") { //Get value from field "ManualRow_type" $Type_value=MsgFieldValue($handle, $NoOfBlockFields_I); } $NoOfBlockFields_I++; } } }
|