TLDR: this is the (or rather, one) correct syntax
newTrial( "experiment" , newText ("FullText", row.FullText), newButton("FTButton1","Proceed to next Trial"), newButton("FTButton2","Proceed to Comprehension Question"), newText("CompQ",row.CompQ), newButton("CQButton","Placeholder, just click to answer"), getText("FullText").print(), ( row.CompYN==Y ? getButton("FTButton2") .print() .wait() .remove("FTButton2","FullText"), getText("CompQ") .print(), getButton("CQButton") .print() .wait() .remove("CompQ","CQButton") : getButton("FTButton1") .print() .wait() .remove("FTButton1","FullText") ) ) //closes newTrial
Note that the condition will be evaluated at the very beginning of your experiment, which is fine in your case because you are testing the value of a column from your table. If you wanted to test a value that is manipulated upon runtime however, say some input from your participant, you would need to use a PennController test command, to ensure that the test is performed only after input.