Як отримати Property Set by name Siebel eScript

function findPropertyByName(pInputs, propertyName, wholeWord) {
// пошук по структурі PropertySet
// pInputs - структура PropertySet, в якій шукаємо
// propertyName - ім'я Child PS, яке шукаємо
// wholeWord - пошук по повній назві true, чи false
// Результат: знайдена Child PS
 
    if ((!wholeWord && pInputs.GetType().indexOf(propertyName) > -1) ||
        (wholeWord && pInputs.GetType() == propertyName)) {
        return pInputs;
    }
 
    for (var i = 0; i < pInputs.GetChildCount(); i++) {
        var psFounded = findPropertyByName(pInputs.GetChild(i), propertyName, wholeWord);
        if (psFounded != null)
            return psFounded;
    }
    return null;
} 
 
 
 
 
//приклад використання
respItem = findPropertyByName(wsOutput, "getBalanceLastDateItem", true)
  if (!!respItem){
    Outputs.SetProperty("Balance",respItem.GetProperty("Balance")/100); 
  }