Hello,
I’m trying to mimic FileMaker’s ability to manage value lists. I have a dedicated table for storing the values contained in these lists. I have also defined a global relation (value_list_global), where globals.value_list_name = value_list.value_list_name.
When the user selects “Edit…” from the value list, I would like to display a form-in-dialog that contains a tabpanel showing the related records (the form in the tabpanel is called ‘value_list’). The following seems to work OK:
var formName = application.getMethodTriggerFormName();
var elementName = application.getMethodTriggerElementName();
// getting the name of the current value list
var valueListName = forms[formName].elements[elementName].getValueListName();
// loading the records based on the global relation
globals.value_list_name = valueListName;
forms.value_list.controller.loadRecords(value_list_global);
application.showFormInDialog(forms.value_list_manage, -1, -1, -1, -1, "Edit Value List: " + valueListName);
I was playing around with the records on the value_list form itself (not in the tabpanel) and omitted a record from a particular list, which normally has 5 values. Then I went to edit the actual list and it only showed the 4 values.
Is this expected behavior? I’ve read up on loadRecords and foundsets, but being a Servoy newbie, these concepts still aren’t entirely clear. How would I modify my code to avoid this problem?
Regards,
Sean