It is currently 21 April 2025, 13:47 Advanced search

What do I need - to do Activation Object

Questions and answers on how to best use Instant Developer

What do I need - to do Activation Object

Postby john w » 18 November 2012, 22:31

I have a panel that I want to open to show the details of the record from the calling field. In this case is License Details being opened from Licenses . The linking field is lic_id in each.

I have dragged and dropped the License Details panels over the Lic_ID field on the License panel. That sets the activation object. When the app is run the License Details panel does openas expected but not to the record (Lic_ID). I need it to be Licenses.Lic_ID = LicenseDetails.Lic_ID

Let me rephrase when a person clicks on the Licenses lic_d column the License Details form/panel opens and I want it to show the details for that license id. I cannot determine what I need to do. I have experimented with various queries, events, etc without success. I suspect I am trying to make this harder than it needs to be.
Regards

John W
User avatar
john w
 
Posts: 834
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA

Re: What do I need - to do Activation Object

Postby r.bianco » 19 November 2012, 7:50

Try this:
1. make a procedure in the master form and d&d it over the activation field
2. make a procedure in the detail form with a param, p_lic_id, and perform: pannel.enterQbeMode; pannel.lic_id.qbeFilter = p_lic_id; pannel.finddata
3. in the master procedure call the detail procedure with the master lic_id as param

sry for my eng... i try ;)
only work and no play makes jack a dull boy
r.bianco
 
Posts: 4962
Joined: 8 November 2010, 16:46

Re: What do I need - to do Activation Object

Postby g.lanzi » 19 November 2012, 9:16

R.bianco's solution is correct. Is this way you can separate the forms by creating two procedures, it has to be noticed that the one in the Detail form doesn't contain references to the Licences one. This is a good thing.

But there is also another method that has to be listed. Let me start with an example.

If you have to implement this kind of behavior with two related tables, such as Products and Categories, you can use a lookup form instead of a normal one in order to show the Categories (or you can just convert a normal form into lookup by using the Make Lookup command of its contextual menu). Then you have to:

  • Drag & drop the Categories lookup form onto the CategoryID field (or onto the possibile CategoryName lookup field in the Products panel)
  • Set the Categories panel's Initial Status property to "Set lookup values and find".

In this way, when you click on che CategoryID field the lookup form will open, already showing only the right category. Internally the framework senses that the user want to look for a category (because it was activated by a CategoryID field) and that the Products table is related to the Categories one with a foreign key. So, right after loading the form, it adds the proper where clause condition to the Categories Panel's master query and then launch the FindData panel command.

You can extend this example in your case too, just use a properly configurated lookup form to show the licence's details and set it as the activation object of the Lic_ID field.
Plus, if you don't want to have a visibile Lic_ID field in your panel you can also create a "View details" button and d&d the lookup form on it too. If the lookup form is the activation object of both the Lic_ID invisibile panel field and the View details button, the trick will work anyway.
Giuseppe Lanzi
Director of Support services
Pro Gamma S.p.A.
User avatar
g.lanzi
Pro Gamma
Pro Gamma
 
Posts: 3503
Joined: 29 September 2010, 10:24
Location: Bologna

Re: What do I need - to do Activation Object

Postby john w » 19 November 2012, 15:28

Thanks to you for your responses. I will work with both of them today and make sure I understand them. If I have problems I will post again. I know this are all very basic In.de development processes but are what I need to create a foundation to build on. I spent several hours yesterday reading the reference material and trying code in different events without success.

R.Bianco - your English is very good and I want to thank you for the response. I really appreciate the time you gave to helping!

Regards

John W.
Regards

John W
User avatar
john w
 
Posts: 834
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA

Re: What do I need - to do Activation Object

Postby john w » 19 November 2012, 15:56

I just wanted you to know that thanks to your answers I have the details form working as wanted.
Regards

John W
User avatar
john w
 
Posts: 834
Joined: 24 October 2012, 16:29
Location: Apple Valley, Minnesota USA

Re: What do I need - to do Activation Object

Postby r.bianco » 3 December 2012, 11:36

=)

i'm glad, and you are wellcome
only work and no play makes jack a dull boy
r.bianco
 
Posts: 4962
Joined: 8 November 2010, 16:46


Return to Tips & Tricks

Who is online

Users browsing this forum: No registered users and 21 guests

cron