Hi @synergywp
I see 2 issues with the above code:
1. get_sub_field does not have a second parameter, this may be producing an error and preventing the code from working
2. Your if statement refers to a variable which does not exist (typo)
How are you with debugging? Can you debug your code to find out the variable data?