Hi, I have the same problem. Can you please share with me your full code of how you use UI_COMMAND_Function in for loop?
UI_COMMAND_Function