Boolean in Transformation

L Younkins asked on October 18, 2022 16:57

Field in page type: selectiveadmissions - set as boolean yes/no.  
In transformation, added: 
 <span class="selective"><%# If(Eval("SelectiveAdmissions"), "&#9745;&nbsp;This is a Selective Admissions Program", " ") %></span>  

Followed code in [documentation](https://docs.xperience.io/k12sp/developing-websites/loading-and-displaying-data-on-websites/writing-transformations/reference-transformation-methods#ReferenceTransformationmethods-Booleanoperations).   

> ERROR MESSAGE when saving in page: An error occurred when saving data. Please see event log for more details. Message: String was not recognized as a valid Boolean.Couldn't store in SelectiveAdmissions Column. Expected type is Boolean.

Recent Answers


Juraj Ondrus answered on October 19, 2022 08:30

What is the data type used for the SelectiveAdmissions field? Is it set to Boolean? What is the value saved in the DB?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.