Thanks for your responses. Sorry for not responding to you sooner. Now, I actually had it done in a different way. But I am going to try your code suggestions to see how they work in case of a future need. Thanks again.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users