Hi, guys, I met a problem when I developing a servoy solution.
I create a combobox which has a dataprovider with a deep chain of relation like a_to_b.b_to_c.c_to_d.id, and its value list is generated by a global method.
If the form is first time shown and at the same time, the selected record doesn't have foreign value, then the global method of value list in that combobox will not fire.
I attached a sample solution to reproduce this bug.
There are four table, a, b, c and d.
a has pk a_id, b_id and a field a_field,
b has pk b_id, c_id,
c has pk c_id, d_id,
d has pk d_id and a field displayvalue
a's b_id and b's pk b_id are linked through the relation a_to_b
b's c_id and c's pk c_id are linked through the relation b_to_c
c's d_id and d's pk d_id are linked through the relation c_to_d
the form's datasource is a, and it has two fields.
one is text field to display the foudset field, and another is a combobox with the dataprovider: a_to_b.b_to_c.c_to_d.d_id. The value list of combo is generated from a global method, the global method will return a value list according to the table d. the real value is the pk of table d, and display value is the 'displayvalue' field of table d.
table a has three records, one does not have any foreign value, but other two both have a full foreign value to table d.
after running the sample solution, u can find that, when first time the form is shown, if the selected record is the one that hasn't foreign value, then the global method of combobox will not fire.
but when one of other two records is selected, because they have full foreign value to the table d, the global method will fire properly.
Did someone meet this issue before? How to tackle it? Perhaps, there is another better way to avoid this issue?
I am looking forward for your kind reply. Thank you guys.