Creating / deleting related records

In FM If I hade a value list that used values based on a relationship I could easily create new records in the related table by just entering data,

Example:

Table 1 orders
Table 2 specs

I have a field in Table 1: model
I have fields in Table 2 table: model, diameter, concentricity, radias, etc.

I have a relationship between the two tables based table 1/ Model = table 2/Model (Allowing creation of records)

I have a value list based on this relationship that is attached to model in table 1.

When the user selects the a model from the list, the specs form table 2 are displayed (radias, diameter, etc ‘these spec fields are editable’)

If the user enters a new model (Not in value list) then enters specs in the editable spec fields, a new record is automatically created in table two with the new model and specs.

I know this can be done in servoy using event driven methods that create records, I can figure that out.

I have relationships set up in servoy that allow the deletion of records, but if I delete the record, the related records are still there.

My question is (Finally), do the ‘allow creation of records’ and ‘allow deletion of records’ in the relationship dialog automate these processes at all. or are they just there to allow the ability via a script?

try these from your form:

// Add a phone record for this name:
name_to_phones.newRecord()

/ / to delete a related phone number from a name:
var answer = “”
if ( name_to_phones.phone != null |name_to_phones.phonetype != null )
{
answer = plugins.dialogs.showDialog(‘Warning - Confirm deletion of phone number’,‘You are about to delete this phone number: ’ + name_to_phones.phoneno +" - " + name_to_phones.phonetype + ’ Do you wish to continue?’,‘No’,‘Yes’);
if (answer == “No”)
{
return ;
}
}
elements.portal_name_to_phones_70.deleteRecord()

Thanks for the help. I guess all related record creations & deletions MUST be via a method.