Conditionally insert subform

I’ve got an application that tracks issues with rentals.I’ve got a generic form that we use to track these Incidents".

There are some issues that are reoccurring like a 30 day notices that require a list of things that need to get done.

I have a subject field on the incident form that utilized a dialog list.

I’d like a subform to appear when “30 Day Notice” is selected.

I’d like a different subform to appear when 3 Day Notice" is selected.

If neither is selected I’d like to just leave the generic form.

I’ve already created the subforms, but can’t figure out how to conditionally insert them into the Incident document.

Thanks for your time in advance.

Jim

Subject: Conditionally insert subform

When you go through the “insert subform” process in your form, there’s a box for “insert subform based on formula.” This will let you put in a formula which will resolve to the name of the form you desire. You’ll want an @If which pays attention to your “notice” field. Search the help for “Insert subform formulas” for fuller instructions.

Subject: RE: Conditionally insert subform

That worked… sort of.The subform does not show up until the document is closed and reopened.

Is there a way to cause the state to change immediately?

It disappears is the subject changes… as I’d expect.

Subject: RE: Conditionally insert subform

No – subforms are determined at load time. If all you want is a hide-when, then use a hide-when.

Subject: RE: Conditionally insert subform

…and, be sure that your dialog list field (Subject) has the property refresh fields on keyword change…

Subject: RE: Conditionally insert subform

Or use programmatic tables based on the value of a field.