My name is Miguel and after careful evaluation “some” playing with Servoy and eavesdropping on this forum alot I’ve decided to buy some Servoy licenses and implement a in-house solution in Servoy. For now I’m just learning how to use Servoy developing some simple use cases.
Naturally learning a new tool means - PROBLEMS - (
Here’s my first one:
2 tables: book and book_details (1-to-M)
I have a tabless panel on the book form where I display related book_details.
The related book_details form is a Table view (locked) with a header displaying labels and a button to create new records and a body part with chapter number, notes and a button to navigate to the book_details form.
The idea is that one is in the book form and presses in a chapter (book_details) button to see (navigate to) the book_detail form.
My problem is that I loose the related book_details set and get the first of all contacts in the book_details table (related or not). Curiously if I only navigate to the book_details list I preserve the found set (book_details).
The code I have on the button is - method gotoBook:
The show function will display a form, but not affect the found set on that form. Look at loadRecords and showRecords.
In any case, here’s what I would do:
If you want to navigate to a particular chapter, then I would put the method in book_details, not in book, and put the button on the row. The method in book_details would load the book_details form.
If you want to just go to all the related book details, though, look at the controller.loadRecords function.
My method is attached to button on a row (as you describe) in book_details_list that is shown in book_form through a tabless panel.
If I make the method: controller.show()
As expected I get the correct record in book_details_list
What I want is to display that specific chapter in book_detail. So I’ve tried the method:
forms.book_detail.controller.show(forms.book_master.book_to_book_details_list)
But that takes me to the first record in the table (which is non-related and certainly not the one I selected)!