I am trying to find how to go about resolving this error.
Compile Error: Illegal assignment from List to String at line 23 column 13
By the way, the data type for "SurveySelection__c" is Number(2,0).
I am not sure whether that matters.
Bottom is my code:
public class WrapperDemoController{
public class TableRow{
public String sfsid {get;set;}
public String SurveySelection {get;set;}
}
public List<TableRow> RowList {get; set;}
public WrapperDemoController(){
RowList = new List<TableRow>();
TableRow tr;
for(Student__c con : [SELECT sfsid__c, (select SurveySelection__c from SurveySelections__r) FROM Student__c]){
tr = new TableRow();
tr.sfsid = con.sfsid__c;
tr.SurveySelection = con.SurveySelections__r; // Line 23: This is line where error occurs**
RowList.add(tr);
}
}
}