function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Unterminated expression: Source


I am getting the below error while saving my  component can anyone help me 

Failed to save CarsearchForm12.cmp: Unterminated expression: Source

<aura:component implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" >
    <aura:attribute name ="buttonLabel"  type="string" default="Search" />
    <aura:attribute name ="NewLabel"  type="string" default="New button" />
    <aura:attribute name ="showNew" type="Boolean" default="false" />
     <aura:attribute name="carTypes" type="String[]" />
    <aura:handler name="init" value="{!this}"  action="{!c.doInit}" />    
    <lightning:layout horizontalAlign="center">
    <lightning:layoutItem padding="around-medium">
    <lightning:select name='selectItem' aura:id ="carTypeList" label='All Types'
                      variant="label-hidden" value="" onchange= "{!.c.newValueSelected">
        <option value ="" text="All types" />
<aura:iteration items ="{!v.carTypes}" var="carType">
                        <option value="{!carType}" text="{!carType}" />
        <lightning:layoutItem padding="around-medium">
<lightning:button label="{!v.buttonlabel}" onclick="{!.c.onSearchClick}" variant="brand" />            
            <aura:if isTrue="{!v.showNew}">
                <lightning:button variant='neutral' label="{#v.newLabel}"/>

I have created a custom object 
Nalini ch 6Nalini ch 6

It looks like our team of experts can help you resolve this ticket. We have Salesforce global help-desk support and you can log a case and our Customer Success Agents will help you solve this issue. You can also speak to them on live chat. Click on the below link to contact our help-desk. Trust me it is a support service that we are offering for free!

Jarvis SFDC team
Manohar BiyaniManohar Biyani


Please refer below part from the code mentioned in question

 <lightning:select name='selectItem' aura:id ="carTypeList" label='All Types'
                      variant="label-hidden" value="" onchange= "{!.c.newValueSelected">

Error might be caused as this epression is not closed with "}"

I hope it helps


Manohar Biyani