• meghna n
  • NEWBIE
  • 130 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 25
    Questions
  • 23
    Replies
Hello
I am having two strings separated by multiple commas. 
I need to retain only a single comma between the two strings.

for example I have as follows var cptCode = G1077,,,,,,,,,,D3456 

so after removing multiple commas, I will have like this :

var cptCode = G1077,D3456 

The user can enter 2 commas or 5 commas between the two strings.
Maximum number of commas between the two strings will be 10.


 I request the members to let me know how to achieve this.

Thanks
Meghna
I have json arrya as follows inside lightning component controller

 var allResultsArray=JSON.stringify(component.get("v.allResults"));

[{"Name":"Cardiology","Code":"839"},{"Name":"Pediatric Cardiology","Code":"824"},{"Name":"Cardiothoracic Surgery","Code":"701"},{"Name":"Interventional Cardiology","Code":"726"},{"Name":"Pediatric Cardiothoracic Surgery","Code":"707"}]

var isName,isCode;

I want to read the Name and Code in variables

I am doing as follows

for(var i=0;i<allResultsArray.length;i++)
{
  isName =allResultsArray[i].Name;
alert(isName);
}

But I am not able to get the vauies of Name  and Code from the above json array

please let me know how I can achieve this.

thanks
Meghna

 
I have as follows in lightning component

distance=2416.63 miles

I want to have as distance=241.63
so pls let me know how to use split function or is there any other method

thanks 
meghna


 
I am using a lightning:formatteddatetime inside lightning component

 <lightning:formattedDateTime value="{!v.claimDetails.effectiveDate}" year="numeric" month="numeric" day="2-digit"/>

It is displaying date as 05/15/2019

How to make the date display as   05/15/2019 instead of     5/15/2019

Thanks
Meghna
I have a piece of code in apex controller as follows.
 @auraEnabled   
    public static List<Service_Request__c> showSomeData(String caseId,String srReason, String recordTypeName)
    {
         try {
               List<Service_Request__c> srList = [SELECT Id,name
                                           FROM Service_Request__c  
                                           WHERE Service_Request_Reason__c =:someCondition];
           return srList;
    }
         catch(Exception e){
         System.debug('Error from ApexController Method' + e.getMessage());
            
        }  
    }

I added the try catch block as above and when I save it shows an error as  " Missing return statement required return type: List<Service_Request__c>"

Please let me know I missing some syntaxt
I am trying to complete the traileehad challenge as below

https://trailhead.salesforce.com/en/content/learn/modules/lightning_connect/lightning_connect_setup?trail_id=force_com_admin_advanced

so when I login with my existing credentials I get an error as "Insuficient privileges".
salesforce connect Insufficient privileges
Please advise as what should I do

thanks
meghna
 
I have a requirement to create a formula field as follows:

The formula field should be created on the LEAD object.

The formula field should evaluate the following 5 fields: Email, Phone, Company, Title, and Industry and return 0 if blank and 1 if not blank.
The formula should then add all the values together to return a total value.

Please let me know how to do this?

thanks 
meghna
I have a piece of code in lightning component as follows.

 <lightning:buttonIcon iconName="utility:filterList" size="medium" class="color" onclick="{!c.providerFilterSearch}" alternativeText="" />
      <aura:if isTrue="{!v.showFindCareFilterCmp}">
           <div aura:id="FilterDropDown" class="slds-dropdown slds-dropdown_right hide dropDownDiv">
           <lightning:card title="Provider Filter">
           <aura:set attribute="actions">
                <button aura:id="cbtnDash" aria-controls="accordion-details-01" class="slds-button_reset slds-accordion__summary-action" label="" onclick="{!c.removeFilterComponent}">                           
                    <lightning:icon iconName="utility:forward" size="small" alternativeText="Indicates forward" />         
                </button>
          </aura:set>
    <hr class="height"></hr>

Now to reduce the height I have written a CSS as follows.
.THIS .height{
    margin:1rem 0;
}

How to achieve the same using slds classes.

Please let me know with a piece of working code.

Thanks
meghna
I have a json as follows

 var providerObj = [];
        providerObj = [{"providerName":"Dr.George A.Beller","network":"In Network","street":"94 Connecticut Blvd","city":"East Hartford","country":"US","state":"CT","postalCode":"06108",
                        "distance":"1.3","phone":"860-528-1359"},

In my component I am using a lightning:map to display the address, this piece of code is working fine.

what I require is to get the geocodes (i.e latitude and longitude) of the above google address as shown in json list

please let me know how to do this.

thanks
meghna

 
I have a piece of code inside my lightning component as follows

CompA.cmp

 <lightning:card>
                <lightning:layout>
                    <lightning:layoutItem flexibility="auto" padding="around-small">
                       <div onkeyup="{!c.handleKeyUp}">
                            <lightning:input
                                             aura:id="enter-search"
                                             name="searchProvider"
                                             label=""
                                             placeholder = "Search by Name, Speciality, Procedure, Condition or Provider ID  "
                                             type="search"
                                             />
                        </div>
                        
                    </lightning:layoutItem>
                    <lightning:layoutItem flexibility="auto" padding="around-small">
                   
                         <lightning:card title="" aura:id="showhide">
                    <cCompB/>
                </lightning:card>

<aura:if  some condition

then display <c:CompC/>

<./aura:component>

CompAController.js

handleKeyUp: function (component,event,helper) {
      
        var isEnterKey = event.keyCode === 13;
        if (isEnterKey) {
            var queryTerm = component.find('enter-search').get('v.value');
           }        }

when I enter some text in above component then it should scroll down automatically to compC
The issue I am facing is it is not scrolling to compC I have to manually scroll from the side bar to compC.

Please tell me how to do this> I find it difficult to handle.

thanks
meghna N
I have piece of code in lightning component which display a map with addresses as follows. 
<aura:component implements="flexipage:availableForAllPageTypes" access="global" >
	 <!-- attributes -->
    <aura:attribute name="mapMarkers" type="Object"/>
    <aura:attribute name="center" type="Object" />
    <aura:attribute name="zoomLevel" type="Integer" />
    <aura:attribute name="markersTitle" type="String" />
    <aura:attribute name="showFooter" type="Boolean" />

    <!-- handlers-->
    <aura:handler name="init" value="{!this}" action="{!c.doInit }"/>

    <!-- the map component -->
    <lightning:map
        mapMarkers="{! v.mapMarkers }"
        center="{! v.center }"
        zoomLevel="{! v.zoomLevel }"
        markersTitle="{! v.markersTitle }"
        showFooter="{ !v.showFooter }" >
    </lightning:map>

</aura:component>
({
	doInit : function(component, event, helper) {
	    component.set('v.mapMarkers', [
            {
                location: {
                    Street: '1 Market St',
                    City: 'San Francisco',
                    PostalCode: '94105',
                    State: 'CA',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'Worldwide Corporate Headquarters',
                description: 'Sales: 1800-NO-SOFTWARE'
            },
            {
                location: {
                    Street: '950 East Paces Ferry Road NE',
                    City: 'Atlanta',
                    PostalCode: '94105',
                    State: 'GA',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Atlanta',
            },
            {
                location: {
                    Street: '929 108th Ave NE',
                    City: 'Bellevue',
                    PostalCode: '98004',
                    State: 'WA',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Bellevue',
            },
            {
                location: {
                    Street: '500 Boylston Street 19th Floor',
                    City: 'Boston',
                    PostalCode: '02116',
                    State: 'MA',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Boston',
            },
            {
                location: {
                    Street: '111 West Illinois Street',
                    City: 'Chicago',
                    PostalCode: '60654',
                    State: 'IL',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Chicago',
            },
            {
                location: {
                    Street: '2550 Wasser Terrace',
                    City: 'Herndon',
                    PostalCode: '20171',
                    State: 'VA',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Herndon',
            },
            {
                location: {
                    Street: '2035 NE Cornelius Pass Road',
                    City: 'Hillsboro',
                    PostalCode: '97124',
                    State: 'OR',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Hillsboro',
            },
            {
                location: {
                    Street: '111 Monument Circle',
                    City: 'Indianapolis',
                    PostalCode: '46204',
                    State: 'IN',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Indy',
            },
            {
                location: {
                    Street: '300 Spectrum Center Drive',
                    City: 'Irvine',
                    PostalCode: '92618',
                    State: 'CA',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Irvine',
            },
            {
                location: {
                    Street: '361 Centennial Parkway',
                    City: 'Louisville',
                    PostalCode: '80027',
                    State: 'CO',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Louisville',
            },
            {
                location: {
                    Street: '685 Third Ave',
                    City: 'New York',
                    PostalCode: '10017',
                    State: 'NY',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc New York',
            },
            {
                location: {
                    Street: '1442 2nd Street',
                    City: 'Santa Monica',
                    PostalCode: '90401',
                    State: 'CA',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Santa Monica',
            },
            {
                location: {
                    Street: '12825 East Mirabeau Parkway',
                    City: 'Spokane',
                    PostalCode: '99216',
                    State: 'WA',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Spokane',
            },
            {
                location: {
                    Street: '4301 West Boy Scout Blvd',
                    City: 'Tampa',
                    PostalCode: '33607',
                    State: 'WA',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Tampa',
            },
            
        ]);

        component.set('v.center', {
            location: {
                City: 'Denver'
            }
        });

        component.set('v.zoomLevel', 4);
        component.set('v.markersTitle', 'Salesforce locations in United States');
        component.set('v.showFooter', true);

	}
})
I tested the above code in my local sandbox it works perfectly but when I test this in my client sandbox it doesn't show the marker(white box) for the last 3  citiies i.e Santa Monica,  Spokane, Tampa

It works perfectly for other cities. I am not able to understand why it works for other cities except the ones I specified.

Can be there be any address limitation issues in sandbox or do we need to purchase some licence?

Pls let me know

thanks
meghna
I have a requirement where I need to implement pagination in lightning component.

At present just for simplicity I am displaying account Names

I need something like this

[First  button]  [Last button]  [Prev button]  [Next Button]

Please let me know with some working code.

thanks
meghna
 
I have a piece of code as follows inside my lightning component
 <aura:attribute name="showAdvancedSearchcmp" type="Boolean"
default="false"/>

 <lightning:layoutItem flexibility="auto" padding="around-small">
                <p></p>
                <br></br>
                <lightning:buttonIcon iconName="utility:search" size="medium" class="color"  onclick="{! c.advancedSearch}" alternativeText="search" />
                <p>Advanced Search</p>
            </lightning:layoutItem>
        </lightning:layout>
    </lightning:card>      
    <aura:if isTrue="{!v.showAdvancedSearchcmp}">
        <div class="slds-p-bottom_xx-small"></div>
        <lightning:card title="">
            <c:GPS_COMP_AdvancedProvider></c:GPS_COMP_AdvancedProvider>
        </lightning:card>
        </lightning:layoutItem>

advancedSearch : function (component,event,helper) {
        component.set("v.showAdvancedSearchcmp",true);
       
    },

when I click the Advanced Search icon it will show up the component GPS_COMP_AdvancedProvider.

My requirement when I click the Advanced Search icon it will show the component GPS_COMP_AdvancedProvider.
Now when I click the Advanced Search icon again it should hide the component GPS_COMP_AdvancedProvider.

Please tell me how I can achieve this.

meghna
I have piece of code inside my lightning component.

   <lightning:card title="Advanced Provider">
         <lightning:layout multipleRows="true">
            <lightning:layoutItem size="4" padding="around-small">
                     <dl class="slds-form_horizontal">
                         <dt title="Network ID">
                             <lightning:select name="select1" label="Network ID">
                                         <option value="1">one</option>
                                         <option value="2">two</option>
                                            <option value="3">three</option>
                             </lightning:select></dt></dl>
                      <dl class="slds-form_horizontal"><dt title="EPDB Flag">
                          <lightning:select name="select2" label="EPDB Flag">
                                               <option value="1">one</option>
                                             <option value="2">two</option>
                                               <option value="3">three</option>
                          </lightning:select></dt></dl>
                      <dl class="slds-form_horizontal"><dt title="Language">
                           <lightning:select name="select3" label="Language">
                                                <option value="1">French</option>
                                              <option value="2">English</option>
                                                <option value="3">German</option>
                          </lightning:select></dt></dl>
                      <dl class="slds-form_horizontal slds-wrap"><dt title="Gender">
                           <lightning:radioGroup name="radioGroup"
                                                    label="Gender"
                                                  options="{!v.optRadio}"
                                                 value="{!v.optRadioValue}"
                                                 type="radio"/></dt></dl>
    </lightning:layoutItem>
          </lightning:layout>
</lightning:card>

when I preview the page the radiobuttons appear as follows

align radiobuttons horizontally
But I want the radiobutton to be placed horizontally not vertically

It should be like this

Gender :  <radioButton>Male      <radiobutton>Female

I tried to use as <dl class="slds-list_inline"> but I am not getting radiobuttons horizontally aligned.

Please show me  piece of working code.

thanks
meghna
 
I have a piece of code inside by lightning component as follows:

<lightning:card title="Advanced Provider Search">
         <lightning:layout multipleRows="true">
               <lightning:layoutItem size="3" padding="around-small">
                    <span>Network ID</span><lightning:select name="select1" label="">
                                                    <option value="1">one</option>
                                                 <option value="2">two</option>
                                                    <option value="3">three</option>
                    </lightning:select>
</lightning:layoutItem>
</lightning:layout>
</lightning:card>

I want to the output as follows

At present when I preview the page the output is as follows

Network ID
<dropdnown List>

But I need the text and the dropdownlist to be aligned in the same line as follows.

Network ID : < dropdownList>

Please tell me how I can achieve this.

thanks
meghna
I have a piece of code inside my lightning component as follows.

<lightning:layout>
  <lightning:layoutItem size="3" padding="around-small">
                            <aura:iteration items="{!v.ratingValue}" var="rating" indexVar="indx">
                                   <aura:if isTrue="{!rating == 1}">
                                              <b>*</b>
                                   </aura:if>
                                   <aura:if isTrue="{!rating == 2}">
                                              <b>* *</b>
                                   </aura:if>
                                   <aura:if isTrue="{!rating == 3}">
                                              <b>* * *</b>
                                   </aura:if>
                                   <aura:if isTrue="{!rating == 4}">
                                              <b>* * * *</b>
                                   </aura:if>
                             </aura:iteration><br/>
                             <span><aura:text value="{!v.ratingValue}"/> ratings</span>&nbsp;&nbsp;<lightning:icon iconName="standard:sales_path" size="x-small"/><br/>
                             <span>View more or Add a review&nbsp;&nbsp;</span><lightning:icon iconName="standard:sales_path" size="x-small"/>
                         <lightning:card title="Provider Flag Information">
                         <table border="1" class="slds-table slds-table_cell-buffer slds-table_bordered slds-table_col-bordered" style="width:78%;">
                                <thead>
                                    <tr>
                                        <th scope="col">
                                            <div class="slds-truncate" title="">Flag Name</div>
                                        </th>
                                        <th scope="col">
                                            <div class="slds-truncate" title="">Begin Date</div>
                                        </th>
                                        <th scope="col">
                                            <div class="slds-truncate" title="">End Date</div>
                                        </th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>
                                            <div class="slds-truncate" title="Print"><lightning:formattedText value="Print"/></div>
                                        </td>
                                        <td>
                                            <div class="slds-truncate" title="Begin Date"><ui:outputDate aura:id="beginDate" value="01/01/1990"/></div>
                                        </td>
                                        <td>
                                            <div class="slds-truncate" title="End Date"><ui:outputDate aura:id="endDate" value="11/12/2018"/></div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="slds-truncate" title="Sample 2"><lightning:formattedText value="Sample 2"/></div>
                                        </td>
                                        <td data-label="Close Date">
                                            <div class="slds-truncate" title="Begin Date"><ui:outputDate aura:id="beginDate" value="05/05/2018"/></div>
                                        </td>
                                        <td data-label="Prospecting">
                                            <div class="slds-truncate" title="End Date"><ui:outputDate aura:id="endDate" value="11/12/2018"/></div>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                           </lightning:card>
                        </lightning:layoutItem>
                    </lightning:layout>
               </lightning:card>

I have attached a screen shot for the same.
Table alignment

My requirement is to align the table header directly under test Text
"View more or Add a review".

Please tell me how to I can achieve this without writing external CSS.

thanks
meghna
 
I have a piece of code inside my lightning component as follows.

 <lightning:accordion allowMultipleSectionsOpen="true" activeSectionName="Provider Details">
            <lightning:accordionSection name="Provider Details" label="Provider Details" >
                <lightning:card title="">
                    <lightning:layout multiplerows="true">
                        <lightning:layoutItem size="5" padding="around-small">
 <div class="left-space"><lightning:formattedText value="10.20 Miles"/></div>

  </lightning:card>
                        </lightning:layoutItem>
                    </lightning:layout>
               </lightning:card>
            </lightning:accordionSection>
 
so in the style of the component I wrote as
.THIS .left-space{
    margin-left : 17px;
}

Now my question is without writing external CSS can we achieve the same using slds classes?

Thanks
meghna
I have a piece of code which will display number of stars depending upon the attribute value as follows

 <aura:attribute name="ratingValue" type="List"/>
    
    <aura:iteration items="{!v.ratingValue}" var="rating" indexVar="indx">
                                   <aura:if isTrue="{!rating == 1}">
                                              <b>*</b>
                                   </aura:if>
                                   <aura:if isTrue="{!rating == 2}">
                                              <b>* *</b>
                                   </aura:if>
                                   <aura:if isTrue="{!rating == 3}">
                                              <b>* * *</b>
                                   </aura:if>
                                   <aura:if isTrue="{!rating == 4}">
                                              <b>* * * *</b>
                                   </aura:if>
                             </aura:iteration>

 <span>{!v.ratingValue} ratings</span>&nbsp;&nbsp;<lightning:icon iconName="standard:sales_path" size="x-small"/>

In the controller of the above component
({
    doInit : function(component, event, helper) {
        
      component.set("v.ratingValue",3);
    }
})

Based on the attribute value I am able to display the stars but {!v.ratingValue} inside the component is not showing any value even though it is set in the controller.

Please let me know if some issue in my code with some correct piece of working code.

thanks
meghna
I am having a piece of code in my lightning component which will display values in a table format.

  <lightning:card title="Provider Flag Information">
                            <table class="slds-table slds-table_cell-buffer slds-table_bordered slds-table_col-bordered">
                                <thead>
                                    <tr class="">
                                        <th class="" scope="col">
                                            <div class="slds-truncate" title="">Flag Name</div>
                                        </th>
                                        <th class="" scope="col">
                                            <div class="slds-truncate" title="">Begin Date</div>
                                        </th>
                                        <th class="" scope="col">
                                            <div class="slds-truncate" title="">End Date</div>
                                        </th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr class="slds-hint-parent">
                                        <td>
                                            <div class="slds-truncate" title="">Print</div>
                                        </td>
                                        <td data-label="Close Date">
                                            <div class="slds-truncate" title="">01/01/1990</div>
                                        </td>
                                        <td data-label="Prospecting">
                                            <div class="slds-truncate" title="Prospecting">11/12/2018</div>
                                        </td>
                                    </tr>
                                    <tr class="slds-hint-parent">
                                        <td>
                                            <div class="slds-truncate" title="">Sample 2</div>
                                        </td>
                                        <td data-label="Close Date">
                                            <div class="slds-truncate" title="">05/05/2018</div>
                                        </td>
                                        <td data-label="Prospecting">
                                            <div class="slds-truncate" title="Prospecting">11/12/2018</div>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                           </lightning:card>

when the page loads then the table is displayed as follows shown in image
Table Image
My requirement is to have a proper border around the table . Is it possible without using CSS in slds or we have to use CSS.

Please show me some working code for my understanding.

thanks
meghna
I have given a image with this post so I want to design accordions
side by  side as given in the image below.

accordion
As of now I have done like this
<aura:component implements="flexipage:availableForAllPageTypes" access="global" >
     <lightning:accordion aura:id="accordion1">
                
               <lightning:accordionSection name="A" label="Behavioral Health Professionals"/>
               <lightning:accordionSection name="B" label="Urgent Care"/>
                <lightning:accordionSection name="B" label="Hospital"/>
                
        </lightning:accordion>
          <lightning:accordion aura:id="accordion2">
                
               <lightning:accordionSection name="A" label="Primary Care"/>
               <lightning:accordionSection name="B" label="Peditrician"/>
                <lightning:accordionSection name="B" label="Dermatologist"/>
                
        </lightning:accordion>
             
  </aura:component>

My requirement is two fold.
a. To keep the accordions to the right hand side of the screen using
     slds classes only (CSS only if required)
b. the accordions should be side by side as shown in image.

I am struggling with slds classes so kindly let me know with piece of working code.

thanks
meghna
 
Hello
I am having two strings separated by multiple commas. 
I need to retain only a single comma between the two strings.

for example I have as follows var cptCode = G1077,,,,,,,,,,D3456 

so after removing multiple commas, I will have like this :

var cptCode = G1077,D3456 

The user can enter 2 commas or 5 commas between the two strings.
Maximum number of commas between the two strings will be 10.


 I request the members to let me know how to achieve this.

Thanks
Meghna
I have json arrya as follows inside lightning component controller

 var allResultsArray=JSON.stringify(component.get("v.allResults"));

[{"Name":"Cardiology","Code":"839"},{"Name":"Pediatric Cardiology","Code":"824"},{"Name":"Cardiothoracic Surgery","Code":"701"},{"Name":"Interventional Cardiology","Code":"726"},{"Name":"Pediatric Cardiothoracic Surgery","Code":"707"}]

var isName,isCode;

I want to read the Name and Code in variables

I am doing as follows

for(var i=0;i<allResultsArray.length;i++)
{
  isName =allResultsArray[i].Name;
alert(isName);
}

But I am not able to get the vauies of Name  and Code from the above json array

please let me know how I can achieve this.

thanks
Meghna

 
I have a requirement to create a formula field as follows:

The formula field should be created on the LEAD object.

The formula field should evaluate the following 5 fields: Email, Phone, Company, Title, and Industry and return 0 if blank and 1 if not blank.
The formula should then add all the values together to return a total value.

Please let me know how to do this?

thanks 
meghna
I have a piece of code inside my lightning component as follows

CompA.cmp

 <lightning:card>
                <lightning:layout>
                    <lightning:layoutItem flexibility="auto" padding="around-small">
                       <div onkeyup="{!c.handleKeyUp}">
                            <lightning:input
                                             aura:id="enter-search"
                                             name="searchProvider"
                                             label=""
                                             placeholder = "Search by Name, Speciality, Procedure, Condition or Provider ID  "
                                             type="search"
                                             />
                        </div>
                        
                    </lightning:layoutItem>
                    <lightning:layoutItem flexibility="auto" padding="around-small">
                   
                         <lightning:card title="" aura:id="showhide">
                    <cCompB/>
                </lightning:card>

<aura:if  some condition

then display <c:CompC/>

<./aura:component>

CompAController.js

handleKeyUp: function (component,event,helper) {
      
        var isEnterKey = event.keyCode === 13;
        if (isEnterKey) {
            var queryTerm = component.find('enter-search').get('v.value');
           }        }

when I enter some text in above component then it should scroll down automatically to compC
The issue I am facing is it is not scrolling to compC I have to manually scroll from the side bar to compC.

Please tell me how to do this> I find it difficult to handle.

thanks
meghna N
I have piece of code in lightning component which display a map with addresses as follows. 
<aura:component implements="flexipage:availableForAllPageTypes" access="global" >
	 <!-- attributes -->
    <aura:attribute name="mapMarkers" type="Object"/>
    <aura:attribute name="center" type="Object" />
    <aura:attribute name="zoomLevel" type="Integer" />
    <aura:attribute name="markersTitle" type="String" />
    <aura:attribute name="showFooter" type="Boolean" />

    <!-- handlers-->
    <aura:handler name="init" value="{!this}" action="{!c.doInit }"/>

    <!-- the map component -->
    <lightning:map
        mapMarkers="{! v.mapMarkers }"
        center="{! v.center }"
        zoomLevel="{! v.zoomLevel }"
        markersTitle="{! v.markersTitle }"
        showFooter="{ !v.showFooter }" >
    </lightning:map>

</aura:component>
({
	doInit : function(component, event, helper) {
	    component.set('v.mapMarkers', [
            {
                location: {
                    Street: '1 Market St',
                    City: 'San Francisco',
                    PostalCode: '94105',
                    State: 'CA',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'Worldwide Corporate Headquarters',
                description: 'Sales: 1800-NO-SOFTWARE'
            },
            {
                location: {
                    Street: '950 East Paces Ferry Road NE',
                    City: 'Atlanta',
                    PostalCode: '94105',
                    State: 'GA',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Atlanta',
            },
            {
                location: {
                    Street: '929 108th Ave NE',
                    City: 'Bellevue',
                    PostalCode: '98004',
                    State: 'WA',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Bellevue',
            },
            {
                location: {
                    Street: '500 Boylston Street 19th Floor',
                    City: 'Boston',
                    PostalCode: '02116',
                    State: 'MA',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Boston',
            },
            {
                location: {
                    Street: '111 West Illinois Street',
                    City: 'Chicago',
                    PostalCode: '60654',
                    State: 'IL',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Chicago',
            },
            {
                location: {
                    Street: '2550 Wasser Terrace',
                    City: 'Herndon',
                    PostalCode: '20171',
                    State: 'VA',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Herndon',
            },
            {
                location: {
                    Street: '2035 NE Cornelius Pass Road',
                    City: 'Hillsboro',
                    PostalCode: '97124',
                    State: 'OR',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Hillsboro',
            },
            {
                location: {
                    Street: '111 Monument Circle',
                    City: 'Indianapolis',
                    PostalCode: '46204',
                    State: 'IN',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Indy',
            },
            {
                location: {
                    Street: '300 Spectrum Center Drive',
                    City: 'Irvine',
                    PostalCode: '92618',
                    State: 'CA',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Irvine',
            },
            {
                location: {
                    Street: '361 Centennial Parkway',
                    City: 'Louisville',
                    PostalCode: '80027',
                    State: 'CO',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Louisville',
            },
            {
                location: {
                    Street: '685 Third Ave',
                    City: 'New York',
                    PostalCode: '10017',
                    State: 'NY',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc New York',
            },
            {
                location: {
                    Street: '1442 2nd Street',
                    City: 'Santa Monica',
                    PostalCode: '90401',
                    State: 'CA',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Santa Monica',
            },
            {
                location: {
                    Street: '12825 East Mirabeau Parkway',
                    City: 'Spokane',
                    PostalCode: '99216',
                    State: 'WA',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Spokane',
            },
            {
                location: {
                    Street: '4301 West Boy Scout Blvd',
                    City: 'Tampa',
                    PostalCode: '33607',
                    State: 'WA',
                    Country: 'USA',
                },

                icon: 'utility:salesforce1',
                title: 'salesforce.com inc Tampa',
            },
            
        ]);

        component.set('v.center', {
            location: {
                City: 'Denver'
            }
        });

        component.set('v.zoomLevel', 4);
        component.set('v.markersTitle', 'Salesforce locations in United States');
        component.set('v.showFooter', true);

	}
})
I tested the above code in my local sandbox it works perfectly but when I test this in my client sandbox it doesn't show the marker(white box) for the last 3  citiies i.e Santa Monica,  Spokane, Tampa

It works perfectly for other cities. I am not able to understand why it works for other cities except the ones I specified.

Can be there be any address limitation issues in sandbox or do we need to purchase some licence?

Pls let me know

thanks
meghna
I have a piece of code as follows inside my lightning component
 <aura:attribute name="showAdvancedSearchcmp" type="Boolean"
default="false"/>

 <lightning:layoutItem flexibility="auto" padding="around-small">
                <p></p>
                <br></br>
                <lightning:buttonIcon iconName="utility:search" size="medium" class="color"  onclick="{! c.advancedSearch}" alternativeText="search" />
                <p>Advanced Search</p>
            </lightning:layoutItem>
        </lightning:layout>
    </lightning:card>      
    <aura:if isTrue="{!v.showAdvancedSearchcmp}">
        <div class="slds-p-bottom_xx-small"></div>
        <lightning:card title="">
            <c:GPS_COMP_AdvancedProvider></c:GPS_COMP_AdvancedProvider>
        </lightning:card>
        </lightning:layoutItem>

advancedSearch : function (component,event,helper) {
        component.set("v.showAdvancedSearchcmp",true);
       
    },

when I click the Advanced Search icon it will show up the component GPS_COMP_AdvancedProvider.

My requirement when I click the Advanced Search icon it will show the component GPS_COMP_AdvancedProvider.
Now when I click the Advanced Search icon again it should hide the component GPS_COMP_AdvancedProvider.

Please tell me how I can achieve this.

meghna
I have piece of code inside my lightning component.

   <lightning:card title="Advanced Provider">
         <lightning:layout multipleRows="true">
            <lightning:layoutItem size="4" padding="around-small">
                     <dl class="slds-form_horizontal">
                         <dt title="Network ID">
                             <lightning:select name="select1" label="Network ID">
                                         <option value="1">one</option>
                                         <option value="2">two</option>
                                            <option value="3">three</option>
                             </lightning:select></dt></dl>
                      <dl class="slds-form_horizontal"><dt title="EPDB Flag">
                          <lightning:select name="select2" label="EPDB Flag">
                                               <option value="1">one</option>
                                             <option value="2">two</option>
                                               <option value="3">three</option>
                          </lightning:select></dt></dl>
                      <dl class="slds-form_horizontal"><dt title="Language">
                           <lightning:select name="select3" label="Language">
                                                <option value="1">French</option>
                                              <option value="2">English</option>
                                                <option value="3">German</option>
                          </lightning:select></dt></dl>
                      <dl class="slds-form_horizontal slds-wrap"><dt title="Gender">
                           <lightning:radioGroup name="radioGroup"
                                                    label="Gender"
                                                  options="{!v.optRadio}"
                                                 value="{!v.optRadioValue}"
                                                 type="radio"/></dt></dl>
    </lightning:layoutItem>
          </lightning:layout>
</lightning:card>

when I preview the page the radiobuttons appear as follows

align radiobuttons horizontally
But I want the radiobutton to be placed horizontally not vertically

It should be like this

Gender :  <radioButton>Male      <radiobutton>Female

I tried to use as <dl class="slds-list_inline"> but I am not getting radiobuttons horizontally aligned.

Please show me  piece of working code.

thanks
meghna
 
I have a piece of code inside by lightning component as follows:

<lightning:card title="Advanced Provider Search">
         <lightning:layout multipleRows="true">
               <lightning:layoutItem size="3" padding="around-small">
                    <span>Network ID</span><lightning:select name="select1" label="">
                                                    <option value="1">one</option>
                                                 <option value="2">two</option>
                                                    <option value="3">three</option>
                    </lightning:select>
</lightning:layoutItem>
</lightning:layout>
</lightning:card>

I want to the output as follows

At present when I preview the page the output is as follows

Network ID
<dropdnown List>

But I need the text and the dropdownlist to be aligned in the same line as follows.

Network ID : < dropdownList>

Please tell me how I can achieve this.

thanks
meghna
I have a piece of code inside my lightning component as follows.

 <lightning:accordion allowMultipleSectionsOpen="true" activeSectionName="Provider Details">
            <lightning:accordionSection name="Provider Details" label="Provider Details" >
                <lightning:card title="">
                    <lightning:layout multiplerows="true">
                        <lightning:layoutItem size="5" padding="around-small">
 <div class="left-space"><lightning:formattedText value="10.20 Miles"/></div>

  </lightning:card>
                        </lightning:layoutItem>
                    </lightning:layout>
               </lightning:card>
            </lightning:accordionSection>
 
so in the style of the component I wrote as
.THIS .left-space{
    margin-left : 17px;
}

Now my question is without writing external CSS can we achieve the same using slds classes?

Thanks
meghna
I have a piece of code which will display number of stars depending upon the attribute value as follows

 <aura:attribute name="ratingValue" type="List"/>
    
    <aura:iteration items="{!v.ratingValue}" var="rating" indexVar="indx">
                                   <aura:if isTrue="{!rating == 1}">
                                              <b>*</b>
                                   </aura:if>
                                   <aura:if isTrue="{!rating == 2}">
                                              <b>* *</b>
                                   </aura:if>
                                   <aura:if isTrue="{!rating == 3}">
                                              <b>* * *</b>
                                   </aura:if>
                                   <aura:if isTrue="{!rating == 4}">
                                              <b>* * * *</b>
                                   </aura:if>
                             </aura:iteration>

 <span>{!v.ratingValue} ratings</span>&nbsp;&nbsp;<lightning:icon iconName="standard:sales_path" size="x-small"/>

In the controller of the above component
({
    doInit : function(component, event, helper) {
        
      component.set("v.ratingValue",3);
    }
})

Based on the attribute value I am able to display the stars but {!v.ratingValue} inside the component is not showing any value even though it is set in the controller.

Please let me know if some issue in my code with some correct piece of working code.

thanks
meghna
I am having a piece of code in my lightning component which will display values in a table format.

  <lightning:card title="Provider Flag Information">
                            <table class="slds-table slds-table_cell-buffer slds-table_bordered slds-table_col-bordered">
                                <thead>
                                    <tr class="">
                                        <th class="" scope="col">
                                            <div class="slds-truncate" title="">Flag Name</div>
                                        </th>
                                        <th class="" scope="col">
                                            <div class="slds-truncate" title="">Begin Date</div>
                                        </th>
                                        <th class="" scope="col">
                                            <div class="slds-truncate" title="">End Date</div>
                                        </th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr class="slds-hint-parent">
                                        <td>
                                            <div class="slds-truncate" title="">Print</div>
                                        </td>
                                        <td data-label="Close Date">
                                            <div class="slds-truncate" title="">01/01/1990</div>
                                        </td>
                                        <td data-label="Prospecting">
                                            <div class="slds-truncate" title="Prospecting">11/12/2018</div>
                                        </td>
                                    </tr>
                                    <tr class="slds-hint-parent">
                                        <td>
                                            <div class="slds-truncate" title="">Sample 2</div>
                                        </td>
                                        <td data-label="Close Date">
                                            <div class="slds-truncate" title="">05/05/2018</div>
                                        </td>
                                        <td data-label="Prospecting">
                                            <div class="slds-truncate" title="Prospecting">11/12/2018</div>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                           </lightning:card>

when the page loads then the table is displayed as follows shown in image
Table Image
My requirement is to have a proper border around the table . Is it possible without using CSS in slds or we have to use CSS.

Please show me some working code for my understanding.

thanks
meghna
I have given a image with this post so I want to design accordions
side by  side as given in the image below.

accordion
As of now I have done like this
<aura:component implements="flexipage:availableForAllPageTypes" access="global" >
     <lightning:accordion aura:id="accordion1">
                
               <lightning:accordionSection name="A" label="Behavioral Health Professionals"/>
               <lightning:accordionSection name="B" label="Urgent Care"/>
                <lightning:accordionSection name="B" label="Hospital"/>
                
        </lightning:accordion>
          <lightning:accordion aura:id="accordion2">
                
               <lightning:accordionSection name="A" label="Primary Care"/>
               <lightning:accordionSection name="B" label="Peditrician"/>
                <lightning:accordionSection name="B" label="Dermatologist"/>
                
        </lightning:accordion>
             
  </aura:component>

My requirement is two fold.
a. To keep the accordions to the right hand side of the screen using
     slds classes only (CSS only if required)
b. the accordions should be side by side as shown in image.

I am struggling with slds classes so kindly let me know with piece of working code.

thanks
meghna
 
Hi

I am having a piece of code that will open an external URL.

whhen I click the button it will open the URL in a web tab on the browser.

here's the code
 <a href="javascript:void(0);" onclick="{!c.openMyProviderPage}">Find provider</a>  

In the controller of the component

 openProviderPage : function(component, event, helper) {
        debugger;
         var pageUrl = component.get("v.findMyProviderURL");
        var urlEvent = $A.get("e.force:navigateToURL");
        urlEvent.setParams({"url": pageUrl });
        urlEvent.fire();
       
I do not want the new URL to open in a separate browser window i.e the new URL should open as a subTab inline.

I hope my requirement is clear.

Please help me out at earliest.


 
I have a lightning datatable as follows. I have given piece of code which I have done.

 <aura:attribute name="mydata" type="Object"/>
 <aura:attribute name="mycolumns" type="List"/>
  <aura:attribute name="openEOBLink" type="String" default=""/>

 <lightning:datatable
                             keyField="id"
                             data="{!v.mydata }"
                             coumns="{!v.mycolumns }"
                             hideCheckboxColumn="true"/>

Controller.js

doInit :  function(component, event, helper) {
 helper.bindDatatableColumns(component,event,helper);   
}
                         
Helper.js

  bindDatatableColumns : function(component,event,helper){ 
        
      component.set('v.mycolumns', [
            {   label: 'Version', 
                fieldName: 'Version', 
                type: 'text', 
                sortable:true,
                cellAttributes: {alignment: 'center'}
            },
            { 
                label: 'EOB/EOP',
                fieldName: 'EOBEOP',
                sortable:false,
                type: 'text',
                cellAttributes: {alignment: 'center'}    
            }

 component.set('v.mydata', [{
                     id: 'a',
                     Version:'1',
                     EOBEOP: component.get("v.openEOBLink")
                },

    component.set("v.openEOBLink",'/lightning/n/GPS_Search_EOB?c__claimId=' + component.get("v.claimId") +
                                           '&c__dateOfService=' +  component.get("v.dateofservice") + 
                                            '&c__memberId=' + component.get("v.memberId") +    
                                            '&c__memberNameforProvider=' + component.get("v.memberName") +
                                            '&c__legalOwnerName=' + component.get("v.ownerName")); 
} //Helper class ends here
   
I am able to display the datatable values and when I click on EOB link in datatable it will take me to an app Builder page by passing the parameter values.

My requirement is as follows:

a. In datatable column value I want to separate EOB and EOP
    clickable links so when I click EOB link it will navigate to EOB
    appbuilder page similarly when I click EOP link it will navigate to
    EOP app Builder  page.

    I have provided a sample code of app builder page and the
    parameters which I need to pass

 Please help me with correct code how I can achieve my requirement.

Thanks
meghna
 
I have a json as follows.
[{"claimId":"M00234835","dateOfServiceBegin":"2018-12-31","legalOwnerName":"Joseph, Alice A","totalBilled":1000,"summary":"summary1","description":"descp1","dateTime":"2019-04-22T05:51:00.000Z","priority":"Low"},
{"claimId":"M00234834","dateOfServiceBegin":"2019-01-01","legalOwnerName":"Health 1st PC","totalBilled":1000,"summary":"","dateTime":"","priority":"Low"}]

I have a lightning component and in the markup I want to display the individual values of the above json.

so I am doing l like this.
<aura:attribute name="claimReworkRecords" type="Object" access="global" description="Claims Rework Data"/>

Now I am getting the entire JSON data into the above attribute I specified.

for(var i=0;i<claimsData.length;i++)
            {
                claimReworkRecords.push({
                    "claimId": claimsData[i].claimId,
                    "dateOfServiceBegin":claimsData[i].dateOfServiceBegin,
                    "legalOwnerName":claimsData[i].legalOwnerName,
                    "totalBilled":claimsData[i].totalBilled,
                    "dateTime":dateTime[i],
                    "priority":priority[i],
                    "summary":summary[i],
                    "description":description[i],
                })
            }

Now I want to display the individual values so in markup I am doing like this
 <aura:iteration items="{!v.claimReworkRecords}" var="claim" indexVar="indx">
            {!claim.claimId}
            {!claim.dateOfServiceBegin}
            
        </aura:iteration>

But its not displaying the individual values. Pleas let me know with correct code how I can achive this.

thanks
meghna