After we updated SD 4.5 to SP 21 we wanted to start using the Form/ subform functionality. We made forms and subforms but we did't get to the OK-buttom in the Insert Subform window to let us store the UI- Rule.
Open Administration Console: Data > Codes > General > Generic Relations Type: Create a Generic Relation Which points to the (Code) Field (i.e.:SC Category) and to the Form: From Item: SC Category To Item: Form
Then define for each SC Category value which subform should be displayed.
Give a Name to the Generic Relation. This name will then be available on your UI.