I would like to have different detail forms depending on a list field in the master form or in detail form

I would like to have different detail forms depending on a list field in the master form or in detail form.
like this:


on other words, I have employee table in master form, and leaves table in details form.
So, When I choose leave type form a list field , I want to change details form for any leave.
Or When I choose leave type form a list field , I want to show/hile some fields based on leave type.

Thanks in advance.

Hi
you can show or hide the details form and/or fields in the load event (master form)

When the list change you can reload the form

regards.

1 Like

Many thanks for your help.
Yes I think this idea, But I don`t know how to do that.
What the codes that I must be write?

Check “Reload form…” in the select
image

Then, the code for hiding blocks and fields in the onload event:

sc_block_display(blockname, off);
sc_field_display({fieldname}, ‘off’);

1 Like

Thank you very much.
But I don`t know what is this?
image

I`m sorry! I want to open subform based on the item that I selected from the list.
So, There are many subform.
How I do that?

Thanks in advance

Thanks for God.
I solved this issue , Look this picture: