This probably the most difficult we will ever come across in Retool.
I have provided some screens to show what I am trying to do. I have no idea how to write the checking and routing code.
I am hoping that someone has already figured this out and can give some advice.
Thanks.
Mike