I have a view that has a boolean field in it and a field that links to a file. I want to use the boolean field to where if it is checked, it will direct to a static link, regardless of what file is uploaded. If it is unchecked and there is no file, I want it to output nothing. If it is unchecked and there is a file, then output the file link. I tried setting up Views PHP and setting this up there, no luck. First question is does Views PHP recognize rewrite rules that you've established in other fields, and if not, how can I accomplish this? Below is the code I tried in Views php. All it does is output the node id for every entry.
<?php
if($row->field_booleanval) {
echo '<a href="http://www.example.com">Link</a>';
}
else if(!($row->field_booleanval) && !($row->field_file)) {
echo ' ';
}
else {
echo $row->field_file;
}
?>