Forum Discussion

meenakshiyadav1's avatar
meenakshiyadav1
Contributor
6 years ago

not able to assign value to ListView Object

I am working on xamarin form based ios app. I am using a keyword driven framework in which I am passing Alias Name, Keyword (Action to be performed) and test data from excel sheet.  when I directly...
  • tristaanogre's avatar
    6 years ago

    You say it "doesn't work".  Are there error messages? warnings? More information is needed.

    Generally, so long as the contents of your Excel sheet match the ACTUAL mapped full Alias path of the object, your code SHOULD work.  One possible suspicion is that if you're doing the eval on the PROPERTY (which is what you are showing in your first example) the "eval" is probably returning the value of the property and not the actual object property itself.

    Suggested edit.

     

    function InputListObj(TestObj,PropertyName, InData)  //Testobj  is Alias name of Object on screen, PropertyName is the desired property for which to set the value  and InData has the string that needs to be set in the field.
    {
    var obj = eval(TestObj)
    
    Obj[PropertyName] = InData
    Delay(1000)
    
    }