Subforms "multi-table"

Hi,

the question is… I want to create the typical subform that allows users to choose a table name, like Product, Resource… and in the next textbox shows the related records. For example a subform that shows two attributes:

Type(Option), with the options Product and Resource

No.(Code) → I want this to show the list of resources (if Type = Resource) or products (if Type = Product)

Somebody knows how to do it?.

Thanks [;)]

You would have to keep the option out of the subform and in the parent.

Then stack a number of subform’ controls on top of each other. Use your option to set all but the selected one to Visible = false.

/TH

Hi Carlos,

I might have read the question wrong but this sounds similar to the functionality that you find on the sales lines form. On this the list for the “no” column is determined by the type which has been selected, so a type of item gives all part codes while a type of text will give all of the type text.

This functionality seems to be performed is on the table itself. Look at the saleline table ( 37) looks and the the properties for field no 6 “No”. In the table relation column there is a breakdown of the relationship by type

Condition Table Field Table Filter

Type=CONST(" ") Standard Text

Type=CONST(G/L Account) G/L Account

Type=CONST(Item) Item

Type=CONST(Resource) Resource

Type=CONST(Fixed Asset) Fixed Asset

Type=CONST(“Charge (Item)”) Item Charge

Hope that helps

Andy

Hi, Carlos

Much depends upon which data you want to show for each entity and from where are you going to get them.

I think the simplest solution would be to create a temporary table to fill with the data either from the Item card (I guess Products are actually items) or the Resource card, according to the chosen option. To handle a temporay table based form you may take a look to form 344.

Hi Carlos, I am not sure 100% what you are trying to achieve, maybe an example would help. But it does seem like you are trying to generate a "SubForm: in a “SubForm”, which is impossible in Navision.

Amount the solutions are:

Redesign the current functionality.

Use a temporary table,

try to syn multi forms for example using NAV: Code to check if a user resizes a Form.

Hi,

I’m afraid Lamby hit the nail on the head, it was really easier than I thought.

Thank you ALL [:D]