Hi, Cu kal.
An indepth question like this isn't usually covered by Community support. We can't afford assigning a developer to assist our free users with coding tasks, unfortunately. You may consider purchasing a support plan that will cover it, if your budget allows.
Though, if you'll manage to find a solution and will be willing to share it with the rest of community, let us know - we'll add this use case to our docs.