Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
One View Based on Changing Base View?
Message
 
 
To
12/06/2001 15:20:00
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00518548
Message ID:
00518569
Views:
12
This message has been marked as the solution to the initial question of the thread.
>An inherited application I'm working on uses a different view for a form depending on the passed parameter from the menu. In turn this populate a grid on a pageframe page in order to select the actual record to work with at the detail level. No problem with that. The problem comes in when it's time to work with the detail of the selected record. I would like to have a view based on the current view to handle this, and then just cascade the updates. I could create separate views for the detail for each of the original views, but this seems redundant. Is there a way to create the detail view on whatever view is active? I have not created views outside the project manager, so be gentle (and detailed) if that is the direction you send me... Thanks!
>
>Regards, Renoir

In these cases, I have a non-updatable view to use in grid for the user to select a record to edit. In this view is also the PK field. I then call my editing form and pass the PK of the record selected [actually I store this value to a global app object property]. The editing form using a 2nd parameterized view with all the fields needed for editing. The parameter used is the PK I just stored in my goApp object property.

The advantage of this is that the lookup form contains a minimum of fields in the view in order to select a record. The updatable view has only 1 record but all the fields needed for editing. This keeps the form performing [loading] as quickly as possible.

As for the update form, I also have code in the Activate to check if the PK value stored in the goApp property has changed. If it has, I issue a TableUpdate on the current record, then do a REQUERY() of the view to get the data for the newly selected record. I am using NON modal forms with private DS to do all this. This allows the user to switch between the 2 forms selecting different records to edit without having to close the editing form first.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform