Delete / add rows to subform based on user input

Delete / add rows to subform based on user input

Hi Zoho,

I have a form with a subform.
In case the user is changing (on edit mode) the input for one of the fields in the main form, I need the subform to be cleared - to have all the rows deleted, and to add just one row with specific values.

in other cases I need to add a (changing) number of rows based on the user input.

Scripting Clear Subform_Name does not seem to do the work.

Help please?

Thank you

Ravod