Your screenshots do not show enough information for me to understand the data relationship.
Can you please include screenshots of the edit page which the data is input? Also, show screenshots of the field group including all fields and location rules.
Attaching the full page of code is a bit overwhelming and I’m not sure If I can help you with this, as it’s not exactly a support question, but more of a ‘can you get this working for me’ type question.
Have you done any debugging? Do you understand what line of code is the issue? Why is it an issue? What does your debugging tell you about this line of code?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!