Reply To: Using if statements during a trial

PennController for IBEX Forums Support Using if statements during a trial Reply To: Using if statements during a trial

#8016
grusha.prasad
Participant

Hi all,

I am working on something similar, but when I use the syntax Jeremy suggested, the statement always evaluates to the else condition. Here is my code and the first few rows of my csv file. Can anyone spot where I am going wrong? For example even when I change the “yes” to “no” only the else statement gets evaluated. This makes me think that my conditional checking is wrong somehow but I can’t spot it.

Thank you!
Grusha.

    
( row.truncated=="yes" ? [
        newText("instructions", "<b>Re-type the partial sentence in the prompt and complete it.</b>")
            .settings.center()
            .settings.css("font-size", "medium")
            .print()
    ] : [
        newText("instructions", "<b>Re-type the full sentence in the prompt.</b>")
            .settings.center()
            .settings.css("font-size", "medium")
            .print()
    ] )

Group,sent_type,struc,prime_type,verb,verb_num,sent_id,sentence,question,response,truncated
list_1A,prime,rrc,NA,recorded,1,recorded1,The priest recorded by the mob preached against violence.,no
list_1A,prime,rrc,NA,recorded,2,recorded2,The management recorded by the employee talked about the importance of privacy.,no
list_1A,prime,rrc,NA,recorded,3,recorded3,The dancer recorded by his trainer practiced energetically.,no
list_1A,target,rrc,rrc,recorded,4,recorded4,The influencer recorded,yes
list_1A,prime,urc,NA,loved,1,loved1,The landlord who was loved by his tenants was very considerate.,no
list_1A,prime,urc,NA,loved,2,loved2,The comedian who was loved by the audience impersonated a famous celebrity.,no
list_1A,prime,urc,NA,loved,3,loved3,The kid who was loved by her parents went to bed with a smile.,no
list_1A,target,rrc,urc,loved,4,loved4,The janitor loved,yes