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
srikanth cheera 11srikanth cheera 11 

Challenge Not yet complete... here's what's wrong: The Quantity field is either not using the lightning formattedNumber component or the value of the item's Quantity__c

<aura:component >
    <aura:attribute name="item" type="Camping_Item__c" required="true"/>
    <p><ui:outputText value="{!v.item.Name}"/></p>
    <p><ui:outputCurrency value="{!v.item.Price__c}"/></p>
    <p><ui:outputNumber value="{!v.item.Quantity__c}"/></p>
    <p><ui:outputCheckbox value="{!v.item.Packed__c}"/></p>
</aura:component>
Siddharth SethSiddharth Seth
Hi srikanth
Instead of this "<p><ui:outputNumber value="{!v.item.Quantity__c}"/></p>" try using the below code:

<p>Price : <lightning:formattedNumber value="{!v.item.Price__c}" style="currency"/>  </p>
 <p>Quantity : <lightning:formattedNumber value="{!v.item.Quantity__c}"/></p>


Best Regards,
Siddharth S.
AppPerfect Corp.
salesforce@appperfect.com (mailto:salesforce@appperfect.com)
408-252-4100
http://www.appperfect.com/salesforce/
srikanth cheera 11srikanth cheera 11
yes it is working thank u....
And one more am unable find my previous lighting programs in developer console 
will u please send me the navigation
Siddharth SethSiddharth Seth
Hi srikanth

Please check if you are logged in using your correct playground(previously which you have used for lightning programs).

Best Regards,
Siddharth S.
AppPerfect Corp.
salesforce@appperfect.com (mailto:salesforce@appperfect.com
408-252-4100
http://www.appperfect.com/salesforce/
Ashutosh Verma 38Ashutosh Verma 38
Please Try this..
<aura:component >    
    <aura:attribute name="item" type="Camping_Item__c" required="true"/>
    <p>Name:
    <ui:outputText value="{!v.item.Name}"/>
    </p>
    <p>Price : <lightning:formattedNumber value="{!v.item.Price__c}" style="currency"/>  </p>
    <p>Quantity : <lightning:formattedNumber value="{!v.item.Quantity__c}"/></p>
    <p>Packed?:<lightning:input type="toggle" label="Packed" name="togglevalue" checked="{!v.item.Packed__c}" />
    </p>
</aura:component>
santhosh s 40santhosh s 40
BEst Answer
Laxmanrao BommsettiLaxmanrao Bommsetti
<aura:component >
    <aura:attribute name="item" type="Camping_Item__c" required="true"/>
    <ui:outputText value = "{!v.item.Name}"/>  
    <p>Packed:<lightning:input type="toggle" label="Packed" name="togglevalue" checked="{!v.item.Packed__c}" /></p>
    <p>Price : <lightning:formattedNumber value="{!v.item.Price__c}" style="currency"/>  </p>      
    <p>Quantity : <lightning:formattedNumber value="{!v.item.Quantity__c}"/></p>
</aura:component>
KONDA B 4KONDA B 4
Try below mentioned code: Its Working.

<aura:component >
    
    <aura:attribute name="item" type="Camping_Item__c" required="true"
                     default="{Name:'Tent', Price__c:100, Quantity__c:1, Packed__c:true}"/>
    
    <ui:outputText value="{!v.item.Name}"/>
    
   
    <lightning:formattedNumber value="{!v.item.Price__c}" style="currency" currencyCode="USD" currencyDisplayAs="symbol"/>

    <lightning:formattedNumber  value="{!v.item.Quantity__c}"/>
    <p> <lightning:input type="toggle"                            
                         label="Packed?"                           
                         name="packed"                         
                         checked="{!v.item.Packed__c}" />
    </p> 
</aura:component>
divya jain 56divya jain 56
Try This code .
<aura:component >
    <aura:attribute Name = "Item"   Type = "Camping_Item__c" required = "True" />
    <p> Name : "{!v.Item.Name}"/> </p>
    <p> Price : 
        <lightning:formattedNumber value="{!v.Item.Price__c}" style="currency"/>
    </p>
    <p>    Quantity : 
         <lightning:formattedNumber value="{!v.Item.Quantity__c}" Style = "Integer" />
    </p>
  
    <p>
        <lightning:input type="toggle"                            
                         label="Packed?"                           
                         name="Packed"                         
                         checked="{!v.Item.Packed__c}" />
     </p> 
    
</aura:component>
Biswajit SamantarayBiswajit Samantaray
I too faced many mistakes.
1. Mistake one: Forgot to use value provider 'v.' . Instead of using 'v.item.Quantity__c' I was using 'item.Quantity__c' at all the places.
2. Mistake two: Name is a standard field in any object. Instead of that I was using Name__c

The minimum requirement for code except for bold part is following:

<aura:component >
    <aura:attribute name="item" type="Camping_Item__c" required="true"/>
   <p>Name: {! v.item.Name}
    </p>
    
     <p>
      Price: <lightning:formattedNumber value="{! v.item.Price__c}" style="currency"/>
    </p>  
    
    <p>Quantity: <lightning:formattedNumber value="{! v.item.Quantity__c}" type="decimal" maximumFractionDigits="0" />
    </p>
   
    <p>  <lightning:input type="toggle" label="Packed?" 
                          name="packed"
                          checked="{! v.item.Packed__c}"/>
    </p>
</aura:component>

We can use the italicized part as an additional to the lightning:formattedNumber in any cases and still the challenge will pass. We can also leave the general HTML markup to pass the challenge
balram kambojbalram kamboj
I am new to salesforce . Can anyone tell me that  If i am using 
<lightning:input type="toggle"  label="Packed?"  name="Packed"  checked="{!v.Item.Packed__c}" />

Is I compulsory to use Checked here ? can't i Use value="{!v.Item.Packed__C}" instead??