I have a model "MEDICATION" which has relation "GENERICS_MED_TRADENAMES". "GENERICS_MED_TRADENAMES" model contains drugForm relation referred to LIST_OF_VALUES model. After getting the result set of MEDICATION from DataProvider to show in ListView, I want to access "group_display_val" attribute of "LIST_OF_VALUES model.
Following are excerpts to show relations of my models:
"$Data" is reference to the data which I obtained from $DataProvider. $Data is used to refer to the attributes of the model against which the result set was obtained. In my case, the query was made to "Medication" which has relation "genMedStrnDrgform".
By the way, I have tried all what you suggested but all in vain.
I am still looking around but loosing hope because it seems that this is not possible. As last resort, I will write a view and query it to display what I want. Thanks for your time anyway.
After detailed investigation, I found out that some rows did not have the referencing id because of which NULL values was coming which was resulting "$data->genMedStrnDrgform->drugForm->group_display_val" to fail. This was correct and now working.