• Nidhi Sharma 13
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 0
    Replies

Hi,

I am trying to import data from a csv file to multiple objects in a single action. My csv file is like this..

S.No.      Column 1      Column 2
               (Parent)       (Child)
1.             A1              -
2.             B1              A1
3.             C1              B1
4.             D1              A1

So, in a way, B1 and D1 are child of A1 and C1 is child of B1

Now I have traversed all csv lines to creat 4 records for A1, B1, C1 & D1 and fetched them in a list. Now I have a parent field in each record named 'Parent Id' which should be null, Id of A1, Id of B1, Id of A1 respectively. I don't want to go with matching names for records because the names might repeat and the code might find 2 records with same name and won't work. But how to fetch the ids in correct places then? Do I need another column to uniquely identify them? What to do?

Hi,


I want that output label - "How many sub-projects" and input field be visible only when radio button "yes" is checked, otherwise invisible. How can I do it in VF


Thanks.

Please refer to code
<apex:pageBlockSection title="Project Details">
    
       <apex:panelGrid columns="2">
        <apex:outputLabel value="Project Name" for="gprojectName"/>
        <apex:inputField id="gprojectName" value="{!gproject.name}"/>
       </apex:panelGrid>
      </apex:pageBlockSection>
      <apex:pageBlockSection title="Decision">
       <apex:panelGrid columns="2">
          <apex:outputLabel value="Does it have sub-project(s)?" 
                           for="radiobtn"/>
          <apex:selectRadio id="radiobtn">
          <apex:selectOption id="radiobtn1" itemLabel="No" itemValue="1"></apex:selectOption>
          <apex:selectOption id="radiobtn2" itemLabel="Yes" itemValue="2"></apex:selectOption>
          </apex:selectRadio>
              
              <apex:outputLabel id="labid" value="How many sub-projects" for="gsubproject"/>
              <apex:inputField id="gsubproject" value="{!gproject.sub}"/>
                       
       </apex:panelGrid>
      </apex:pageBlockSection>

 

Hi,

I want that output label - "How many sub-projects" and input field be visible only when radio button "yes" is checked, otherwise invisible. How can I do it in VF

Thanks.

Please refer to code

<apex:pageBlockSection title="Project Details">
    
       <apex:panelGrid columns="2">
        <apex:outputLabel value="Project Name" for="gprojectName"/>
        <apex:inputField id="gprojectName" value="{!gproject.name}"/>
       </apex:panelGrid>
      </apex:pageBlockSection>
      <apex:pageBlockSection title="Decision">
       <apex:panelGrid columns="2">
          <apex:outputLabel value="Does it have sub-project(s)?" 
                           for="radiobtn"/>
          <apex:selectRadio id="radiobtn">
          <apex:selectOption id="radiobtn1" itemLabel="No" itemValue="1"></apex:selectOption>
          <apex:selectOption id="radiobtn2" itemLabel="Yes" itemValue="2"></apex:selectOption>
          </apex:selectRadio>
              
              <apex:outputLabel id="labid" value="How many sub-projects" for="gsubproject"/>
              <apex:inputField id="gsubproject" value="{!gproject.sub}"/>
                       
       </apex:panelGrid>
      </apex:pageBlockSection>