This topic is locked
[SOLVED]

 project site UI locked to mastertable view

3/21/2018 3:49:58 PM
PHPRunner General questions
I
infotech author

I have some menu weirdness in a phprunner built site (9.8 29967 x64):
Clients table and Houses table joined (houses hold many clients).
main Menu Item: Clients link works appropriately to get to clients

[indent]

http://localhost:8085/clients_list.php?f=%28Active~equals~Yes%29&tab=MyRegion&orderby=aLast_Name

[/indent]
In the list view for houses, Users can click on a detail 'popup' (clients link) to enter house/client detail records for house. (view the clients in that house).

[indent]Landing the user in mastertable/client-details url (so far so good)

http://localhost:8085/clients_list.php?mastertable=houses&masterkey1=305&tab=MyRegion&orderby=aLast_Name

[/indent]
However, after entering house/client-details screen the Menu item: Clients link target appears to change:

[indent]

http://localhost:8085/clients_list.php?menuItemId=2&f=%28Active~equals~Yes%29&tab=MyRegion&orderby=aLast_Name

[/indent]

[indent][indent]The url is not the same as was defined in the menu link target - menuItemId=2& was added to the link target ??[/indent][/indent]
upon clicking Menu item: Clients link - the interface gets trapped in the house that was viewed.

  • Clicking the Menu item: Clients link lands the user at:

    [indent]http://localhost:8085/clients_list.php?f=%28Active~equals~Yes%29&mastertable=houses&masterkey1=305&tab=MyRegion&orderby=aLast_Name

    [/indent]

    [indent][indent]url was modified to add mastertable=houses&masterkey1=305 (or whatever house id that was viewed) ???[/indent][/indent]
    The user cannot get back to the clients list-page without the 'mastertable' filter applied. (breaking my app).
    The only way out if this mastertable trap is to Log out and Log back in.
    as long as the user DOES NOT click into master/detail screens, the Client link on the menu takes the user the to the correct url.
    I tried to change the masterdetail view to inline, but moving into any other master/detail screen, say the clients "notes" details links, also locks the UI to mastertable=houses&masterkey1=###.
    I am so totally lost.
    {wonk}



admin 3/22/2018

I do not have a complete info to fully understand the issue but here is what I think. If you have master-details relationship in your project do no access details table directly. You always supposed to access it through the master table.

I
infotech author 3/22/2018

Sergey,
Thanks, your confirmation that I should always access detail through master table got me past the hump.

  • I am going to attempt to break the master table link by moving the master/detail view to different tables (views)
    {wonk}

I
infotech author 3/22/2018

Sergey,
Thanks, your confirmation that I should always access detail through master table got me past the hump.
[indent]

  • I solved it by creating a new view of both the Houses and Clients tables with entirely different names.

    This let me make an entirely new Menu item to this master-client view.

    This served a dual purpose.
    [indent]1. I could reduce the number of fields displayed in the client detail record for the houses.

    [indent] instead of being stuck with the default 'list view' fields chosen for the 'Clients' table.[/indent]

  1. the houses table as master is only linked to a view and not the actual clients table.[/indent]
    Because the master-client view is now not tied to the 'clients' table by name

  • the url target for 'Active Clients' does not lock in to a mastertable and links directly to 'Clients' table as expected.

    [/indent]
    I realize that being new to phprunner, php and JavaScript, that I have a large learning curve, but I appreciate your reply.

    Slightly sticky configurations happen I know because of my inexperience creating application front-ends.

    phprunner is doing so much of the heavy-lifting for me. I find the money spent very worthwhile.

    phprunner again and again seriously proves it is an awesome tool for single-person developer environments.

    AND is saving my company boo-coos (beaucoups) of bucks by not outsourcing this front-end to expensive developer houses.
    {wonk}