• Alastair Scollay 8
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I realise this question has been asked a few times already but couldn't find any suggested solution that worked for me, so here goes.....

I am currently trying to complete the 'Using Expressions' challenge on the Trailhead Lightning site, and keep getting the same error.

Code
 Component
<aura:component >
    <aura:attribute name="IsSunday" type="Boolean" default="false"/>
    <aura:attribute name="IsMonday" type="Boolean" default="false"/>
    <aura:attribute name="IsTuesday" type="Boolean" default="false"/>
    <aura:attribute name="IsWednesday" type="Boolean" default="false"/>
    <aura:attribute name="IsThursday" type="Boolean" default="false"/>
    <aura:attribute name="IsFriday" type="Boolean" default="false"/>
    <aura:attribute name="IsSaturday" type="Boolean" default="false"/>
    
    <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.IsTuesday}">
    <p>Today is Tuesday</p>
    </aura:if>
    <aura:if isTrue="{!v.IsWednesday}">
    <p>Today is Wednesday</p>
    </aura:if>
    <aura:if isTrue="{!v.IsThursday}">
    <p>Today is Thursday</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>

CONTROLLER
({
    doInit : function(component) {
        var theDate = new Date();
        if (theDate.getDay()==0) {component.set("v.IsSunday", true);}
        if (theDate.getDay()==1) {component.set("v.IsMonday", true);}
        if (theDate.getDay()==2) {component.set("v.IsTuesday", true);}
        if (theDate.getDay()==3) {component.set("v.IsWednesday", true);}
        if (theDate.getDay()==4) {component.set("v.IsThursday", true);}
        if (theDate.getDay()==5) {component.set("v.IsFriday", true);}
        if (theDate.getDay()==6) {component.set("v.IsSaturday", true);}
    }
})

ERROR
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: ZPWCUPZG

I tried creating a new Developer edition, as per a suggestion on another thread, but got the same error (albeit with a different error id).

I went back to my original developer edition and tried another suggestion - modifying the code in my component to have only one <aura:if> statement and one <aura:set attribute....> tag, as shown below:

<aura:component >
    <aura:attribute name="IsSunday" type="Boolean" default="false"/>
    <aura:attribute name="IsMonday" type="Boolean" default="false"/>
    <aura:attribute name="IsTuesday" type="Boolean" default="false"/>
    <aura:attribute name="IsWednesday" type="Boolean" default="false"/>
    <aura:attribute name="IsThursday" type="Boolean" default="false"/>
    <aura:attribute name="IsFriday" type="Boolean" default="false"/>
    <aura:attribute name="IsSaturday" type="Boolean" default="false"/>
    
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    
    <aura:if isTrue="{!v.IsSunday}">
    <p>Today is Sunday</p>
        <aura:set attribute="else">
                Today is not Sunday
        </aura:set>
    </aura:if>

<!-- Commented out code -->
    <!-- <aura:if isTrue="{!v.IsMonday}">
    <p>Today is Monday</p>
    </aura:if>
    <aura:if isTrue="{!v.IsTuesday}">
    <p>Today is Tuesday</p>
    </aura:if>
    <aura:if isTrue="{!v.IsWednesday}">
    <p>Today is Wednesday</p>
    </aura:if>
    <aura:if isTrue="{!v.IsThursday}">
    <p>Today is Thursday</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> -->
<!-- Commented out code -->

</aura:component>

Same end result:
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: MEEOAPTN

Any help would be appreciated. have spent quite a lot of time on this already!
I realise this question has been asked a few times already but couldn't find any suggested solution that worked for me, so here goes.....

I am currently trying to complete the 'Using Expressions' challenge on the Trailhead Lightning site, and keep getting the same error.

Code
 Component
<aura:component >
    <aura:attribute name="IsSunday" type="Boolean" default="false"/>
    <aura:attribute name="IsMonday" type="Boolean" default="false"/>
    <aura:attribute name="IsTuesday" type="Boolean" default="false"/>
    <aura:attribute name="IsWednesday" type="Boolean" default="false"/>
    <aura:attribute name="IsThursday" type="Boolean" default="false"/>
    <aura:attribute name="IsFriday" type="Boolean" default="false"/>
    <aura:attribute name="IsSaturday" type="Boolean" default="false"/>
    
    <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.IsTuesday}">
    <p>Today is Tuesday</p>
    </aura:if>
    <aura:if isTrue="{!v.IsWednesday}">
    <p>Today is Wednesday</p>
    </aura:if>
    <aura:if isTrue="{!v.IsThursday}">
    <p>Today is Thursday</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>

CONTROLLER
({
    doInit : function(component) {
        var theDate = new Date();
        if (theDate.getDay()==0) {component.set("v.IsSunday", true);}
        if (theDate.getDay()==1) {component.set("v.IsMonday", true);}
        if (theDate.getDay()==2) {component.set("v.IsTuesday", true);}
        if (theDate.getDay()==3) {component.set("v.IsWednesday", true);}
        if (theDate.getDay()==4) {component.set("v.IsThursday", true);}
        if (theDate.getDay()==5) {component.set("v.IsFriday", true);}
        if (theDate.getDay()==6) {component.set("v.IsSaturday", true);}
    }
})

ERROR
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: ZPWCUPZG

I tried creating a new Developer edition, as per a suggestion on another thread, but got the same error (albeit with a different error id).

I went back to my original developer edition and tried another suggestion - modifying the code in my component to have only one <aura:if> statement and one <aura:set attribute....> tag, as shown below:

<aura:component >
    <aura:attribute name="IsSunday" type="Boolean" default="false"/>
    <aura:attribute name="IsMonday" type="Boolean" default="false"/>
    <aura:attribute name="IsTuesday" type="Boolean" default="false"/>
    <aura:attribute name="IsWednesday" type="Boolean" default="false"/>
    <aura:attribute name="IsThursday" type="Boolean" default="false"/>
    <aura:attribute name="IsFriday" type="Boolean" default="false"/>
    <aura:attribute name="IsSaturday" type="Boolean" default="false"/>
    
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    
    <aura:if isTrue="{!v.IsSunday}">
    <p>Today is Sunday</p>
        <aura:set attribute="else">
                Today is not Sunday
        </aura:set>
    </aura:if>

<!-- Commented out code -->
    <!-- <aura:if isTrue="{!v.IsMonday}">
    <p>Today is Monday</p>
    </aura:if>
    <aura:if isTrue="{!v.IsTuesday}">
    <p>Today is Tuesday</p>
    </aura:if>
    <aura:if isTrue="{!v.IsWednesday}">
    <p>Today is Wednesday</p>
    </aura:if>
    <aura:if isTrue="{!v.IsThursday}">
    <p>Today is Thursday</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> -->
<!-- Commented out code -->

</aura:component>

Same end result:
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: MEEOAPTN

Any help would be appreciated. have spent quite a lot of time on this already!