You need to sign in to do that
Don't have an account?
TrailHead Lightning Component Using Expression failed Error : YUMZCIAK
Hello,
I use code bellow and have a same error in two different SandBoxes.
Challenge not yet complete... here's what's wrong:
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: YUMZCIAK
Component
<aura:component >
<aura:attribute name = "IsSunday" type = "Boolean" default="false"/>
<aura:attribute name = "IsMonday" type = "Boolean" default="false"/>
<aura:attribute name = "IsThuesday" type = "Boolean" default="false"/>
<aura:attribute name = "IsWednesday" type = "Boolean" default="false"/>
<aura:attribute name = "IsThuerday" type = "boolean" default="false"/>
<aura:attribute name = "IsFriday" type = "boolean" default="false"/>
<aura:attribute name = "IsSaturday" type = "boolean" default="false"/>
<aura:attribute name="today" type="Date" default=""/>
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<aura:if isTrue="{!v.IsSunday}" >
<p> Today is Sunday </p>
</aura:if>
<aura:if isTrue="{!v.IsMonday}" >
<p> Today is Monday </p>
</aura:if>
<aura:if isTrue="{!v.IsThuesday}" >
<p> Today is Thuesday </p>
</aura:if> <aura:if isTrue="{!v.IsWednesday}" >
<p> Today is Wednesday </p>
</aura:if> <aura:if isTrue="{!v.IsThuerday}" >
<p> Today is IsThuerday </p>
</aura:if> <aura:if isTrue="{!v.IsFriday}" >
<p> Today is Friday </p>
</aura:if> <aura:if isTrue="{!v.IsSaturday}" >
<p> Today is Saturday </p>
</aura:if>
</aura:component>
and as a controller
({
doInit: function(cmp) {
var Aujourdhui = new Date();
if (Aujourdhui.getDay()==0) {cmp.set("v.IsSunday", true); }
if (Aujourdhui.getDay()==1) {cmp.set("v.IsSunday", true);}
if (Aujourdhui.getDay()==2) {cmp.set("v.IsSunday", true); }
if (Aujourdhui.getDay()==3) {cmp.set("v.IsSunday", true); }
if (Aujourdhui.getDay()==4) {cmp.set("v.IsSunday", true); }
if (Aujourdhui.getDay()==5) {cmp.set("v.IsSunday", true); }
if (Aujourdhui.getDay()==6) {cmp.set("v.IsSunday", true); }
}
})
Thans for help
Hervé Colsenet
I use code bellow and have a same error in two different SandBoxes.
Challenge not yet complete... here's what's wrong:
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: YUMZCIAK
Component
<aura:component >
<aura:attribute name = "IsSunday" type = "Boolean" default="false"/>
<aura:attribute name = "IsMonday" type = "Boolean" default="false"/>
<aura:attribute name = "IsThuesday" type = "Boolean" default="false"/>
<aura:attribute name = "IsWednesday" type = "Boolean" default="false"/>
<aura:attribute name = "IsThuerday" type = "boolean" default="false"/>
<aura:attribute name = "IsFriday" type = "boolean" default="false"/>
<aura:attribute name = "IsSaturday" type = "boolean" default="false"/>
<aura:attribute name="today" type="Date" default=""/>
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<aura:if isTrue="{!v.IsSunday}" >
<p> Today is Sunday </p>
</aura:if>
<aura:if isTrue="{!v.IsMonday}" >
<p> Today is Monday </p>
</aura:if>
<aura:if isTrue="{!v.IsThuesday}" >
<p> Today is Thuesday </p>
</aura:if> <aura:if isTrue="{!v.IsWednesday}" >
<p> Today is Wednesday </p>
</aura:if> <aura:if isTrue="{!v.IsThuerday}" >
<p> Today is IsThuerday </p>
</aura:if> <aura:if isTrue="{!v.IsFriday}" >
<p> Today is Friday </p>
</aura:if> <aura:if isTrue="{!v.IsSaturday}" >
<p> Today is Saturday </p>
</aura:if>
</aura:component>
and as a controller
({
doInit: function(cmp) {
var Aujourdhui = new Date();
if (Aujourdhui.getDay()==0) {cmp.set("v.IsSunday", true); }
if (Aujourdhui.getDay()==1) {cmp.set("v.IsSunday", true);}
if (Aujourdhui.getDay()==2) {cmp.set("v.IsSunday", true); }
if (Aujourdhui.getDay()==3) {cmp.set("v.IsSunday", true); }
if (Aujourdhui.getDay()==4) {cmp.set("v.IsSunday", true); }
if (Aujourdhui.getDay()==5) {cmp.set("v.IsSunday", true); }
if (Aujourdhui.getDay()==6) {cmp.set("v.IsSunday", true); }
}
})
Thans for help
Hervé Colsenet
Try the challenge using a fresh org, see if the error still persists
Thanks
Anand
Sandeep
I redo the same thing ( after correcting the code) in another sand box and error id is : JTRBOSRU
(coorection is obvious :
({
doInit: function(cmp) {
var Aujourdhui = new Date();
if (Aujourdhui.getDay()==0) {cmp.set("v.IsSunday", true); }
if (Aujourdhui.getDay()==1) {cmp.set("v.IsMonday", true);}
if (Aujourdhui.getDay()==2) {cmp.set("v.IsThuesday", true); }
if (Aujourdhui.getDay()==3) {cmp.set("v.IsWednesday", true); }
if (Aujourdhui.getDay()==4) {cmp.set("v.IsThuerday", true); }
if (Aujourdhui.getDay()==5) {cmp.set("v.IsFriday", true); }
if (Aujourdhui.getDay()==6) {cmp.set("v.IsSaturday", true); }
}
})
Best regards
Hervé
Check this :
https://developer.salesforce.com/forums/?id=906F0000000BSAtIAO
Regards,
Ajay