Forum Discussion

abrar22's avatar
abrar22
Frequent Contributor
9 years ago
Solved

Getting the Property Name

Hi All,

 

I am creating the getter function to get the value of property which I am passing in the parameter but I am getting error as it is not recognising the property  name:

 

vGetComboBoxValue(Aliases.Cube.CubeTransitionBox.HedgeAndQuoteStyleView.HedgeType_Cbx,'wItemList');

 

function vGetComboBoxValue(NameMapAlias,strProperty)
{
return NameMapAlias.strProperty;
Log.Message(NameMapAlias.strProperty)
}

 

Can someone help ?

 

Thanks

 

  • Instead of

    NameMapAlias.strProperty

    use any of these:

    NameMapAlias[strProperty]
    // or
    aqObject.GetPropertyValue(NameMapAlias, strProperty)

3 Replies

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    Instead of

    NameMapAlias.strProperty

    use any of these:

    NameMapAlias[strProperty]
    // or
    aqObject.GetPropertyValue(NameMapAlias, strProperty)
  • djadhav's avatar
    djadhav
    Regular Contributor

    What error are you getting? Is that JSCript code?

  • NisHera's avatar
    NisHera
    Valued Contributor

    in your function return is before Log message, you will not see log message at all.

    b'cos once return excute function stops going further down.

     

    also can you read value of  

    Aliases.Cube.CubeTransitionBox.HedgeAndQuoteStyleView.HedgeType_Cbx.wItemList

     using object spy ?

    If it's a list box is it open when you looking for?