On the field the user enters the data.
Add a rule
Add a condition
field = select enter formula
add a field
Navigate to the secondary data source
select the coresponding SQL field
Ok that
Then add an action to set a field value
select status field
and then put the text "flagged" or what ever you want.
Then once they enter a value and leave the cell if that value is found in the SQL data the field will be updated otherwise it will remain unchanged.
Play with this.