Compare Field to Connected Field

Is there a way to use an “if” statement to compare a field value in a data table to a connected field value? I’m having issues with exports and I am trying to find a workaround until tech support can fix the issue.