|
Re: Alternative to the LINK1 pattern [message #7455 is a reply to message #7454] |
Mon, 06 April 2020 05:17 |
AJM
Messages: 2368 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
I have split this post into a separate thread as the subject matter is different from that of the original thread.
If you wish to make multiple selections from a database table which you then wish to add into the database using the current task then I'm afraid that this can ONLY be done using a popup. Remember that a popup task will allow you to make multiple selections which can be processed in one go instead of single selections which have to be processed one at a time.
Navigation buttons cannot be used to make selections, they simple run another task, and after the popup task has terminated all the calling task can do is refresh itself.
You haven't really identified what you are trying to do and how you would like it done. If you say that when you define a team for a new season that most of the members are the same, so you don't want to start with an empty team then the solution is obvious - start by copying all the team's members from the previous season into the new one, then make changes by adding or removing individual members.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
Re: Alternative to the LINK1 pattern [message #7456 is a reply to message #7455] |
Mon, 06 April 2020 15:32 |
htManager
Messages: 434 Registered: May 2014
|
Senior Member |
|
|
Thank you for your proposed solutions. The way I wanted it to be done is the way I know. This doesn't mean that this is a good way. But I thought that it would be logical if you can choose and insert desired records into a child table.
If you say that I should copy all members of a team into the new team of the next season, this would be a good solution for me. But I don't know how to do this.
Is it right that I first have to create the new team, then select the team with the members to be inserted? And do I have to do this with an add4 pattern?
Or do I have to select all the team members which I want to insert in the new team and then choose the new team? And with which pattern?
Or do you think of a complete different way?
[Updated on: Tue, 07 April 2020 03:22] Report message to a moderator
|
|
|
Re: Alternative to the LINK1 pattern [message #7457 is a reply to message #7456] |
Tue, 07 April 2020 05:09 |
AJM
Messages: 2368 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
There may be times when what you want to achieve cannot be done in a single task. In this case you have to break it down into a series of logical steps, then find a way to perform each of those steps in the desired sequence. In the attached screenshot, which is taken from my ERP application, you will see how I have implemented the task to copy or transfer the details of one sales order to another. This is broken down into separate steps as follows:
1) This is a MULTI4 task which is activated by a navigation button in a "List Sales Order" screen. It shows the Order Header in the top zone and the order lines in the bottom zone.
2) It contains a custom button labelled "Create Order" which is used to create a new (empty) order which will be recipient of the selected order lines.
3) After the new order is created the user selects which order lines need to be processed.
4) By pressing the "Copy Items" navigation button the selected items will be copied to the new order.
5) By pressing the "Transfer Items" navigation button the selected items will be copied to the new order then deleted from the old order.
All it requires is a bit of creative thinking.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
[Updated on: Tue, 07 April 2020 05:12] Report message to a moderator
|
|
|
Re: Alternative to the LINK1 pattern [message #7458 is a reply to message #7457] |
Tue, 07 April 2020 16:11 |
htManager
Messages: 434 Registered: May 2014
|
Senior Member |
|
|
Thank you for your information and for your ideas about solving such a problem. It is very logical.
But unfortunately it is a little bit too much for me at the moment. I am about to understand always more the way your framework works but to create these tasks is too much for me at the moment. That's why I will suspend this problem until I am even more familiar with the method Radicore works.
Moreover I designed my code always the other way round (in ObjectPal). I created the parent record and then called popups to select these child records which I wanted to insert. That makes it a little more difficult for me.
I will come back to your proposed method as soon as I am ready.
|
|
|