• Justin D
  • NEWBIE
  • 20 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 18
    Questions
  • 5
    Replies
I am trying to do this Trailhead, and stuck on this procedure.
https://trailhead.salesforce.com/modules/lex_customization/units/lex_customization_page_layouts

" To change page layout assignments, click Page Layout Assignment and then click Edit Assignment. "

Where do I find the Page Layout Assignment ?

Thanks in advance.
 
Hi Community.

I am stuck in this step.
https://trailhead.salesforce.com/modules/business_process_automation/units/approvals

1. Navigate to the object management settings for Opportunity.
2. Scroll to the Fields & Relationships section, and click New.

Where do I go?

Thanks.
Justin

 
I am stuck here.
According to the instruction (under "Add Actions to Execute when the Criteria are Met"), it says:

Select Opportunity > Account ID and then click Choose.

But, it does not give that option, but it leads to next drop down menu.
So, I do not know how to go about clicking "Choose".


User-added image.
I am trying to import data from csv file into Salesfoce using Python.
I am trying to import date field with time - for example: 2017-07-24 10:28:00 .
I think I could either use either Date or Date/Time field on Salesforce database, but I am not sure.
On some article, this format (  YYYY-MM-DD hh:mm:ss ) works at either Date or Date/Time field, and some other people are saying, it should work at Date field.
And on some article, it says, it should be "YYYY-MM-DD" only.  
I am confused.

On my login history, this data integration is considered "SOAP Partner under API Type.

So the error message says " u'JSON_PARSER ERROR', u'message': u'Cannot deserialize instance of date from VALUE_STRING value 2017-07-24 10:28:00 or request may be missing a required field at [line:1, column:50

I am not trying to open this csv file in Excel, but just leave it as it is.


  
I have been working on showing error messages (guard clause).
When I click the commandButton, the guard clauses (error messages) show up, but it does not retrieve the output.
So, the issue now is, data output would not showing up. 
Appereciate for any help!

I have added these lines on Apex file (bold).
-----------------------------------------------------------------
public PageReference searchPatients(){           
           
        if (lname == null || lname.length() < 3)
        {
            ApexPages.addMessage(new ApexPages.Message(
            ApexPages.Severity.ERROR, 'Please specify at least three characters of Last Name'
            ));
            return null;
        }

    
        if (fname == null || fname.length() < 3)
        {
            ApexPages.addMessage(new ApexPages.Message(
            ApexPages.Severity.ERROR, 'Please specify at least three characters of First Name'
            ));
            return null;
        }  
                
        
        String bind_fname = string.isBlank(fName) || fname.length() <3 ? null : (fname.left(3) + '%');
        String bind_lname = string.isBlank(lname) || lname.length() <3 ? null : (lname.left(3) + '%');

        RowList = new List<TableRow2>();
        TableRow2 tr;

        for(Patient__c con : [SELECT sfprn__c, 
                                    mrn__c,
                                    LName__c, 
                                    FName__c,
                                    (select SurveySelection__c.SurveySelection__c from SurveySelections__r) 
                                    FROM Patient__c
                                    where ( mrn__c =:mrn )                     
                                    or ( LName__c LIKE :bind_lname and FName__c LIKE :bind_fname ) LIMIT 1 
                                    ]){                                    
            tr = new TableRow2();
            tr.sfprn = con.sfprn__c;
            tr.mrn = con.mrn__c;
            tr.lname = con.LName__c;
            tr.fname = con.FName__c;
            tr.SurveySelection = con.SurveySelections__r.isEmpty() ? null : con.SurveySelections__r[0].SurveySelection__c;
            
            RowList.add(tr);         
        }
        return null;   
    } 

_______________________________________
Bottom is VF page

 <apex:pageBlock >
        <!-- Search button-->
        <apex:pageBlockButtons location="top">
            <apex:pageMessages id="msgs" />                   
              <apex:commandButton value="Search" action="{!searchPatients}" rerender="msgs"/> 
        </apex:pageBlockButtons>
               
        <apex:pageBlockSection id="msgs" columns="1">
        <!--
        <apex:pageBlockSection id="contact-table" columns="1"> -->         
            <!-- Input starts -->
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="MRN" />
                <apex:inputText value="{!mrn}"/>            
            </apex:pageBlockSectionItem>             
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="Last Name" />
                <apex:inputText value="{!lname}"/>            
            </apex:pageBlockSectionItem>
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="First Name" />
                <apex:inputText value="{!fname}"/>            
            </apex:pageBlockSectionItem> 
            <!-- Input ends --> 

           <!-- Output starts --->
            <apex:pageBlockTable value="{!RowList}" var="c">
                <apex:column >
                    <apex:facet name="header">MRN</apex:facet>
                    {!c.mrn}
                </apex:column>
                <apex:column >
                    <apex:facet name="header">Last Name</apex:facet>
                    {!c.lname}
                </apex:column>
                <apex:column >
                    <apex:facet name="header">First Name</apex:facet>
                    {!c.fname}
                </apex:column>                         
             </apex:pageBlockTable>
             <!-- Output ends ---> 
 </apex:pageBlock>  
 
I have a flat file (.csv) that gets appended everydaywith two columns of data (UniqueID and Number (1-10)).
I am trying to update into Salesforce database on a daily basis as well.

What is best practice of doing it?
Is there any tool inside Salesforce org that would do it?
I am from Microsoft stack (using SSIS (SQL Server Integration Service)), so I am trying to find out if there is any tool or API inside Salesforce.
Should I just use Python file and run it?
I am trying to have a minimum 3 characters of First Name and Last Name in order to retrieve the data, but now, it retrieves result of data even it is less than 3 characters.

Thanks in advance.

Bottom is Apex code:
----------------------------------------------------------------------------
public with sharing class psw {
    public String sfprn { get; set; }
    public String mrn {get;set;}
    public String lname {get;set;}
    public String fname {get;set;}


public class TableRow2{
    public String sfprn {get;set;}
    public String mrn {get;set;}
    public String lname {get;set;}
    public String fname {get;set;}
    public Decimal SurveySelection {get;set;}
}

public List<TableRow2> RowList {get; set;}

public PageReference searchPatients(){

    RowList = new List<TableRow2>();
    TableRow2 tr;

    String bind_fname = string.isBlank(fName) ? null : (fname.left(3) + '%');
    String bind_lname = string.isBlank(lname) ? null : (lname.left(3) + '%');

    for(Patient__c con : [SELECT sfprn__c, 
                                mrn__c,
                                LName__c, 
                                FName__c,
                                (select SurveySelection__c.SurveySelection__c from SurveySelections__r) 
                                FROM Patient__c
                                where ( mrn__c =:mrn )
                              //or ( LName__c =:lname and FName__c =:fname) LIMIT 1 
                                or ( LName__c LIKE :bind_lname and FName__c LIKE :bind_fname ) LIMIT 1                       
                                ]){                                    
        tr = new TableRow2();
        tr.sfprn = con.sfprn__c;
        tr.mrn = con.mrn__c;
        tr.lname = con.LName__c;
        tr.fname = con.FName__c;
        tr.SurveySelection = con.SurveySelections__r.isEmpty() ? null : con.SurveySelections__r[0].SurveySelection__c;

        RowList.add(tr);         

        }
     return null;   


}

Bottom is VF code:
----------------------------------------------------------------------------

<apex:page Controller="psw" showHeader="false" sidebar="false">
<apex:form >
<apex:pageBlock >
    <!-- Search button-->
    <apex:pageBlockButtons location="top">
        <apex:commandButton value="Search" action="{!searchPatients}" reRender="contact-table"/>
    </apex:pageBlockButtons>

    <apex:pageBlockSection id="contact-table" columns="1">
        <!-- Input starts -->
        <apex:pageBlockSectionItem >
            <apex:outputLabel value="MRN" />
            <apex:inputText value="{!mrn}"/>            
        </apex:pageBlockSectionItem>

        <apex:pageBlockSectionItem >
            <apex:outputLabel value="Last Name" />
            <apex:inputText value="{!lname}"/>            
        </apex:pageBlockSectionItem>
        <apex:pageBlockSectionItem >
            <apex:outputLabel value="First Name" />
            <apex:inputText value="{!fname}"/>            
        </apex:pageBlockSectionItem> 
        <!-- Input ends -->

        <!-- Output 1 starts --->
        <apex:pageBlockTable value="{!RowList}" var="c">
            <apex:column >
                <apex:facet name="header">MRN</apex:facet>
                {!c.mrn}
            </apex:column>
            <apex:column >
                <apex:facet name="header">Last Name</apex:facet>
                {!c.lname}
            </apex:column>
            <apex:column >
                <apex:facet name="header">First Name</apex:facet>
                {!c.fname}
            </apex:column>                         
         </apex:pageBlockTable>
         <!-- Output 1 ends --->  
     </apex:pageBlockSection>       
    </apex:pageBlock>    
</apex:form>    
</apex:page>
 
I was trying to add a dropdown menu inside VF page (where I already have other pageBlockTables).
I only need to retrieve one field (c.sfprn) from an existing SOQL query where it is already used for other pageBlockTables.

Here is part of my VF page (where I am trying to add a dropdown menu) :

<!-- DropDown Menu starts -->
<apex:pageBlockTable value="{!RowList}" var="c">
   <apex:column >
      <apex:facet name="header">All Surveys</apex:facet>
          <span>All Surveys: </span>
             <apex:selectList id="AllSurvey" size="1">
                <apex:selectOptions value="http://www.test.com?sfprn={!c.sfprn}&id=1>Test1</apex:selectOptions>
                <apex:selectOptions value="http://www.test.com?sfprn={!c.sfprn}&id=2>Test1</apex:selectOptions>
    </apex:column>
</apex:pageBlockTable>
<!-- DropDown Menu ends -->

Here is portion of Apex code:

public PageReference searchPatients(){

        RowList = new List<TableRow2>();
        TableRow2 tr;

        for(Patient__c con : [SELECT sfprn__c, 
                                    mrn__c,
                                    LName__c, 
                                    FName__c,
                                    (select SurveySelection__c.SurveySelection__c from SurveySelections__r) 
                                    FROM Patient__c
                                    where mrn__c =:mrn 
                                    or LName__c =:lname LIMIT 1                                
                                    ]){
                                 
            tr = new TableRow2();
            tr.sfprn = con.sfprn__c;
            tr.mrn = con.mrn__c;
            tr.lname = con.LName__c;
            tr.fname = con.FName__c;
            tr.SurveySelection = con.SurveySelections__r.isEmpty() ? null : con.SurveySelections__r[0].SurveySelection__c;
            
            RowList.add(tr);
            }
         return null;   
    } 


I am curious whether I need to add a new method in Apex or I could just call the value="{!RowList}" to bring one field (c.sfprn).

Thanks in advance.  
Hi Everyone,
I am trying to figure out how to resolve this error. Any feedback is appereciated.

Visualforce Error: Return type of an Apex action method must be a PageReference. Found: core.apexpages.el.adapters.ApexListELAdapter
-------------------------------------

Bottom is my VF markup:
-------------------------------------
<apex:page Controller="WrapperDemoController2">
<apex:form >
    <apex:pageBlock >
        <!-- Serarch button-->
        <apex:pageBlockButtons location="top">
            <apex:commandButton value="Search" action="{!searchPatients}" reRender="contact-table"/>
         </apex:pageBlockButtons>
                
        <apex:pageBlockSection id="contact-table" columns="1">
            <!-- Input -->
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="MRN" />
                <apex:inputText value="{!mrn}"/>
            
            </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
    
            <!-- Output --->
            <apex:pageBlockTable value="{!RowList}" var="c">
                <apex:column value="{!c.mrn}"/>
                <apex:column value="{!c.sfprn}"/>
                <apex:column value="{!c.SurveySelection}"/>
            </apex:pageBlockTable>   
    </apex:pageBlock>
</apex:form>    
</apex:page>
------------------------------------------
Bottom is Apex code:
------------------------------------------
public class WrapperDemoController2{
   
    public String sfprn { get; set; }
    public String searchPatients { get; set; }
    public String mrn {get;set;}
    
    public class TableRow2{
        public String sfprn {get;set;}
        public String mrn {get;set;}
        public Decimal SurveySelection {get;set;}
    }
   
    public List<TableRow2> RowList {get; set;}

    public List<TableRow2> searchPatients(){

        RowList = new List<TableRow2>();
        TableRow2 tr;

        for(Patient__c con : [SELECT sfprn__c, 
                                    mrn__c, 
                                    (select SurveySelection__c.SurveySelection__c from SurveySelections__r) 
                                    FROM Patient__c
                                    where mrn__c =:mrn                                    
                                    ]){
                                 
            tr = new TableRow2();
            tr.sfprn = con.sfprn__c;
            tr.mrn = con.mrn__c;
            tr.SurveySelection = con.SurveySelections__r.isEmpty() ? null : con.SurveySelections__r[0].SurveySelection__c;
            
            RowList.add(tr);
            }
         return RowList;   
    }    
}
 
Hi Everyone,
I am trying to display data using Wrapper class.
I got this error.  Compile Error: Missing return statement required return type at line 15:
This is line 15: public List < TableRow2 > searchPatients(){​
Appreciated for any feedback!

This is Apex code:
------------------------------------------------------------------------------------------------
public class WrapperDemoController2{

    public String mrn {get;set;}  
 
    /*Wrapper Class*/
    public class TableRow2{
        public String sfprn {get;set;}
        public String mrn {get;set;}
        public Decimal SurveySelection {get;set;}
    }
       
    public List<TableRow2> searchPatients {get;set;}
       
    /*Method that has a return type of List<TableRow2>*/  
    public List<TableRow2> searchPatients(){

        searchPatients = new List<TableRow2>();
        TableRow2 tr;

        for(Patient__c con : [SELECT sfprn__c, 
                                    mrn__c, 
                                    (select SurveySelection__c.SurveySelection__c from SurveySelections__r) 
                                    FROM Patient__c
                                    where mrn__c =:mrn                                    
                                    ]){
                                 
            tr = new TableRow2();
            tr.sfprn = con.sfprn__c;
            tr.mrn = con.mrn__c;
            tr.SurveySelection = con.SurveySelections__r.isEmpty() ? null : con.SurveySelections__r[0].SurveySelection__c;
            
            searchPatients.add(tr);
            }
     }    
}

This is VF page:
---------------------------------------
<apex:page controller="WrapperDemoController2">
<apex:form >
    <apex:pageBlock >
        <!-- Serarch button-->
        <apex:pageBlockButtons location="top">
            <apex:commandButton value="Search" action="{!searchPatients}" reRender="contact-table"/>
        </apex:pageBlockButtons>
        
        <!-- Input -->
        <apex:pageBlockSection >
        <apex:pageBlockSectionItem >
            <apex:outputLabel value="MRN" />
            <apex:inputText value="{!mrn}"/>
        
        </apex:pageBlockSectionItem>
        </apex:pageBlockSection>
    
        <!-- Output --->
        <apex:pageBlockTable value="{!searchPatients}" var="c">
            <apex:column value="{!c.mrn}"/>
            <apex:column value="{!c.sfprn}"/>
            <apex:column value="{!c.SurveySelection}"/>
        </apex:pageBlockTable>   
    </apex:pageBlock>
</apex:form>    
</apex:page>

Hi Everyone,
I am trying to find how to go about resolving this error. I am new to Apex.
   Compile Error: Illegal assignment from List<SurveySelection__c> to String at line 23 column 13

Bottom is my code:
By the way, the data type for "SurveySelection__c" is Number(2,0). I am not sure whether that matters. 
-----------------------------------------------------------------------------------------------------------------------------------------------------
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;  // This is line where error occurs
            
            RowList.add(tr);
        }
    }
}


-----------------------------------------------------------------------------------------------------------------------
Thanks in advance!

I am trying to write a SOQL statement that has a relationship between two tables.
The table "Survey__c" has a relationship with table "Student__c" at "StudentID__c"

The bottom query is what I am trying to mimic.
​SELECT Name, Phone, Account.Name FROM Contact

I have a bottom one so far, but I am not sure how to express correctly.
SELECT OtherUnique_ID, (Select SurveyChoice__c from Survey__r) FROM Student__c 

Can you please give me some feeback? Thanks in advance.
 
I am not sure when/whether I should put logic inside Apex class or use Visualforce page to display data.

Here is logic.
Depending on the 
SurveySelection, it would display data (surveytype) differently.

Logic:

If  (SurveySelection__c = 1) {
              Surveytype__c = “final1” and “final2”
} else if (SurveySelection__c = 2) {
              Surveytype__c = “midterm1” and “midterm2”
} else {
              Surveytype__c = “openbooktest1” and “openbooktest2”
}
  

My question is: should I use If Statement inside APEX code like below or should I program inside VF page?​

Here is some Apex code that I have:

 
Public  PageReference   searchStudents()
{
students = [ select
                           LName__c
                           , (select SurveySelection__c from SurveySelections__r )
                           From Student__c ];
 
surveyselections = [select
                             SurveySelection__c
                             From SurveySelection__c ];
 
surveyreference  = [select
                             SurveyType__c
                             From SurveyReference__c ]; 
              Return null;      
}
 
 
I have trying to find an option in Salesforce that I could schedule a time on a daily basis to import/update data from Microsoft SQL Server to Salesforce.
Is there any tool inside Salesforce?
If I use SSIS package, I am afraid that I need to host a server.
I am trying to utilize as much as possible at Salesforce instead of using other third-party tool or host a sever.
Thanks in advance.
 
I am so new to Visualforce.
I was able to create a community for the first time.
If I want to create a visualforce page and apply inside Community, do I have to create at 
"https://na40.salesforce.com/apex/.."  first and do something to transfer into Community page?
I know this could be very basic procedure.


 
I am trying to login into Community's URL directly after log out from the Communities URL .
For example, my communities:  https://radonctest-developer-edition.na40.force.com/RadOncDev

How can I bypass logging into the main page (https://na40.salesforce.com/home/home.jsp) and go to
Customize -> Communities --> All Communities and click my community URL?
I am trying to develop Login page using bottom example:
http://appirio.com/tech-blog/create-custom-salesforce-communities-login-landing-page

In the instruction, it says: 
Now under Customize -> Communities -> "Manage Communities" lets create a community. I am going to keep mine under the root url and call it Custom Login Demo.

I do not see that inside Salesforce. All I see is "Communities Setting, All Communities, Lightning Bolt Pages and Lightning Bolt Solutions".
How do I go about do Site Edit?

Thanks in advance
 
I am very new to Visualforce (only last few days).
I am trying to create a web page inside VF where I could pass different parameters from various data fields into an URL to do some action (for this case, passing URL to SurveyGizmo site).

So, for example, URL should be something like this:
http://www.surveygizmo.com//000000/Survey-v1?sfprn=a0000000000EEEEEE&first_name=ZZ&last_name=ZZ&birth_year=1900&birth_month=01&show_survey=1

So, only focus should be creating URL properly, and it gets triggerred by user from either a link or a button.
Where should I focus looking into for this type of functionality?
Sorry, this might be very basic stuff :)
 
I am trying to do this Trailhead, and stuck on this procedure.
https://trailhead.salesforce.com/modules/lex_customization/units/lex_customization_page_layouts

" To change page layout assignments, click Page Layout Assignment and then click Edit Assignment. "

Where do I find the Page Layout Assignment ?

Thanks in advance.
 
I have trying to find an option in Salesforce that I could schedule a time on a daily basis to import/update data from Microsoft SQL Server to Salesforce.
Is there any tool inside Salesforce?
If I use SSIS package, I am afraid that I need to host a server.
I am trying to utilize as much as possible at Salesforce instead of using other third-party tool or host a sever.
Thanks in advance.
 
I am trying to import data from csv file into Salesfoce using Python.
I am trying to import date field with time - for example: 2017-07-24 10:28:00 .
I think I could either use either Date or Date/Time field on Salesforce database, but I am not sure.
On some article, this format (  YYYY-MM-DD hh:mm:ss ) works at either Date or Date/Time field, and some other people are saying, it should work at Date field.
And on some article, it says, it should be "YYYY-MM-DD" only.  
I am confused.

On my login history, this data integration is considered "SOAP Partner under API Type.

So the error message says " u'JSON_PARSER ERROR', u'message': u'Cannot deserialize instance of date from VALUE_STRING value 2017-07-24 10:28:00 or request may be missing a required field at [line:1, column:50

I am not trying to open this csv file in Excel, but just leave it as it is.


  
I am trying to have a minimum 3 characters of First Name and Last Name in order to retrieve the data, but now, it retrieves result of data even it is less than 3 characters.

Thanks in advance.

Bottom is Apex code:
----------------------------------------------------------------------------
public with sharing class psw {
    public String sfprn { get; set; }
    public String mrn {get;set;}
    public String lname {get;set;}
    public String fname {get;set;}


public class TableRow2{
    public String sfprn {get;set;}
    public String mrn {get;set;}
    public String lname {get;set;}
    public String fname {get;set;}
    public Decimal SurveySelection {get;set;}
}

public List<TableRow2> RowList {get; set;}

public PageReference searchPatients(){

    RowList = new List<TableRow2>();
    TableRow2 tr;

    String bind_fname = string.isBlank(fName) ? null : (fname.left(3) + '%');
    String bind_lname = string.isBlank(lname) ? null : (lname.left(3) + '%');

    for(Patient__c con : [SELECT sfprn__c, 
                                mrn__c,
                                LName__c, 
                                FName__c,
                                (select SurveySelection__c.SurveySelection__c from SurveySelections__r) 
                                FROM Patient__c
                                where ( mrn__c =:mrn )
                              //or ( LName__c =:lname and FName__c =:fname) LIMIT 1 
                                or ( LName__c LIKE :bind_lname and FName__c LIKE :bind_fname ) LIMIT 1                       
                                ]){                                    
        tr = new TableRow2();
        tr.sfprn = con.sfprn__c;
        tr.mrn = con.mrn__c;
        tr.lname = con.LName__c;
        tr.fname = con.FName__c;
        tr.SurveySelection = con.SurveySelections__r.isEmpty() ? null : con.SurveySelections__r[0].SurveySelection__c;

        RowList.add(tr);         

        }
     return null;   


}

Bottom is VF code:
----------------------------------------------------------------------------

<apex:page Controller="psw" showHeader="false" sidebar="false">
<apex:form >
<apex:pageBlock >
    <!-- Search button-->
    <apex:pageBlockButtons location="top">
        <apex:commandButton value="Search" action="{!searchPatients}" reRender="contact-table"/>
    </apex:pageBlockButtons>

    <apex:pageBlockSection id="contact-table" columns="1">
        <!-- Input starts -->
        <apex:pageBlockSectionItem >
            <apex:outputLabel value="MRN" />
            <apex:inputText value="{!mrn}"/>            
        </apex:pageBlockSectionItem>

        <apex:pageBlockSectionItem >
            <apex:outputLabel value="Last Name" />
            <apex:inputText value="{!lname}"/>            
        </apex:pageBlockSectionItem>
        <apex:pageBlockSectionItem >
            <apex:outputLabel value="First Name" />
            <apex:inputText value="{!fname}"/>            
        </apex:pageBlockSectionItem> 
        <!-- Input ends -->

        <!-- Output 1 starts --->
        <apex:pageBlockTable value="{!RowList}" var="c">
            <apex:column >
                <apex:facet name="header">MRN</apex:facet>
                {!c.mrn}
            </apex:column>
            <apex:column >
                <apex:facet name="header">Last Name</apex:facet>
                {!c.lname}
            </apex:column>
            <apex:column >
                <apex:facet name="header">First Name</apex:facet>
                {!c.fname}
            </apex:column>                         
         </apex:pageBlockTable>
         <!-- Output 1 ends --->  
     </apex:pageBlockSection>       
    </apex:pageBlock>    
</apex:form>    
</apex:page>
 
I was trying to add a dropdown menu inside VF page (where I already have other pageBlockTables).
I only need to retrieve one field (c.sfprn) from an existing SOQL query where it is already used for other pageBlockTables.

Here is part of my VF page (where I am trying to add a dropdown menu) :

<!-- DropDown Menu starts -->
<apex:pageBlockTable value="{!RowList}" var="c">
   <apex:column >
      <apex:facet name="header">All Surveys</apex:facet>
          <span>All Surveys: </span>
             <apex:selectList id="AllSurvey" size="1">
                <apex:selectOptions value="http://www.test.com?sfprn={!c.sfprn}&id=1>Test1</apex:selectOptions>
                <apex:selectOptions value="http://www.test.com?sfprn={!c.sfprn}&id=2>Test1</apex:selectOptions>
    </apex:column>
</apex:pageBlockTable>
<!-- DropDown Menu ends -->

Here is portion of Apex code:

public PageReference searchPatients(){

        RowList = new List<TableRow2>();
        TableRow2 tr;

        for(Patient__c con : [SELECT sfprn__c, 
                                    mrn__c,
                                    LName__c, 
                                    FName__c,
                                    (select SurveySelection__c.SurveySelection__c from SurveySelections__r) 
                                    FROM Patient__c
                                    where mrn__c =:mrn 
                                    or LName__c =:lname LIMIT 1                                
                                    ]){
                                 
            tr = new TableRow2();
            tr.sfprn = con.sfprn__c;
            tr.mrn = con.mrn__c;
            tr.lname = con.LName__c;
            tr.fname = con.FName__c;
            tr.SurveySelection = con.SurveySelections__r.isEmpty() ? null : con.SurveySelections__r[0].SurveySelection__c;
            
            RowList.add(tr);
            }
         return null;   
    } 


I am curious whether I need to add a new method in Apex or I could just call the value="{!RowList}" to bring one field (c.sfprn).

Thanks in advance.  
Hi Everyone,
I am trying to figure out how to resolve this error. Any feedback is appereciated.

Visualforce Error: Return type of an Apex action method must be a PageReference. Found: core.apexpages.el.adapters.ApexListELAdapter
-------------------------------------

Bottom is my VF markup:
-------------------------------------
<apex:page Controller="WrapperDemoController2">
<apex:form >
    <apex:pageBlock >
        <!-- Serarch button-->
        <apex:pageBlockButtons location="top">
            <apex:commandButton value="Search" action="{!searchPatients}" reRender="contact-table"/>
         </apex:pageBlockButtons>
                
        <apex:pageBlockSection id="contact-table" columns="1">
            <!-- Input -->
            <apex:pageBlockSectionItem >
                <apex:outputLabel value="MRN" />
                <apex:inputText value="{!mrn}"/>
            
            </apex:pageBlockSectionItem>
            </apex:pageBlockSection>
    
            <!-- Output --->
            <apex:pageBlockTable value="{!RowList}" var="c">
                <apex:column value="{!c.mrn}"/>
                <apex:column value="{!c.sfprn}"/>
                <apex:column value="{!c.SurveySelection}"/>
            </apex:pageBlockTable>   
    </apex:pageBlock>
</apex:form>    
</apex:page>
------------------------------------------
Bottom is Apex code:
------------------------------------------
public class WrapperDemoController2{
   
    public String sfprn { get; set; }
    public String searchPatients { get; set; }
    public String mrn {get;set;}
    
    public class TableRow2{
        public String sfprn {get;set;}
        public String mrn {get;set;}
        public Decimal SurveySelection {get;set;}
    }
   
    public List<TableRow2> RowList {get; set;}

    public List<TableRow2> searchPatients(){

        RowList = new List<TableRow2>();
        TableRow2 tr;

        for(Patient__c con : [SELECT sfprn__c, 
                                    mrn__c, 
                                    (select SurveySelection__c.SurveySelection__c from SurveySelections__r) 
                                    FROM Patient__c
                                    where mrn__c =:mrn                                    
                                    ]){
                                 
            tr = new TableRow2();
            tr.sfprn = con.sfprn__c;
            tr.mrn = con.mrn__c;
            tr.SurveySelection = con.SurveySelections__r.isEmpty() ? null : con.SurveySelections__r[0].SurveySelection__c;
            
            RowList.add(tr);
            }
         return RowList;   
    }    
}
 

Hi Everyone,
I am trying to find how to go about resolving this error. I am new to Apex.
   Compile Error: Illegal assignment from List<SurveySelection__c> to String at line 23 column 13

Bottom is my code:
By the way, the data type for "SurveySelection__c" is Number(2,0). I am not sure whether that matters. 
-----------------------------------------------------------------------------------------------------------------------------------------------------
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;  // This is line where error occurs
            
            RowList.add(tr);
        }
    }
}


-----------------------------------------------------------------------------------------------------------------------
Thanks in advance!