showFormInDialog syntax

I think I’ve lost it now…

Just showing a form in dialog - it works fine but I need to show it with a relationship and I cant seem to find the correct sysntax.

application.showFormInDialog('corro_frm_temp_repairs_history_work.g_temp_repair_history_to_temp_repair_history', -1, -1, -1, -1, 'Temporary Repairs Change History', false, false, 'showTempRepHistory', true)

Is what I was hoping to use - which is a form with a relationship. Have I misconstrued how to show this related form in a dialog?

The relationship is good and the form is good - so obviously my syntax is bad!

I’v never seen calling a form and specifying the relationship with it, is that possible? We use a lot of related FIDs, the way we do it it make the FID based on the same parent table as a container and place the related form in a tabpanel in it, specifying the relation in the tab.

msedita:
I’v never seen calling a form and specifying the relationship with it, is that possible? We use a lot of related FIDs, the way we do it it make the FID based on the same parent table as a container and place the related form in a tabpanel in it, specifying the relation in the tab.

Michael - that would be an approach but it seem illogical to have to place a form in a tab on an otherwise blank form to get the related data (its a global relationship BTW).

I suspect another way would be to load the foundset for the FID to match what I need in the relationship (one criteria in a global). But again seems like two steps where one should suffice?

Hi Ian,

Kahuna:
I suspect another way would be to load the foundset for the FID to match what I need in the relationship (one criteria in a global). But again seems like two steps where one should suffice?

No this is exactly how you do it. If you want to show a specific foundset in the FID then you need to load it yourself. Of course there are different techniques of establishing this but in the end it’s your code that gets the proper foundset.
2 possible ways of doing this is where you load the (separate) foundset before you show the FID or you use a onShow event on the form that uses the global as criteria to load the proper foundset.

Hope this helps.

showFormInDialog is a ui thing, not data.
Show you show a form, you dont show a relation.

The form that you show should be configured the way you like, like:

forms.dialogform.loadRecords(corro_frm_temp_repairs_history_work.g_temp_repair_history_to_temp_repair_history);
application.showFormInDialog(forms.dialogform,xxxxx)

jcompagner:
showFormInDialog is a ui thing, not data.
Show you show a form, you dont show a relation.

The form that you show should be configured the way you like, like:

forms.dialogform.loadRecords(corro_frm_temp_repairs_history_work.g_temp_repair_history_to_temp_repair_history);

application.showFormInDialog(forms.dialogform,xxxxx)

Yes, that’s the way I finally configured it thanks Johan.