Hello Vangelis,
You must use the UI-API FormSettings Object for this. This a childobject of the Form (see SDK help for reference)
Depending what the difference are between item A and item B, you will need to keep attention to the performance.
Good luck.
Regards Teun