Support » Plugin: WP Data Access » templates, projects and pages

  • Resolved gaetgodi

    (@gaetgodi)


    My application creates many tables with the same structure but different information (Schedules and results from weekly tournaments).
    For the Schedules, there is no problem. I create a table called Schedules and it has its own template, project and page. When I create a new schedule it just overwrites the old Schedules table and all works well.
    However… for results I want to keep a history of each week’s result table. I create a unique table (unique in name only, Results####, where #### is the weekly event number).
    I have created a template Results which works fine until I want to publish the results. I want to use the Results template with a unique Results page (which I can create under php control). However the page/template insists on checking the table name associated with it. With a different name it does not use the template, despite it’s having the same structure.
    Would a true template not be independent of the table it was created with? I don’t mind keeping the name of the table that created the template but that name should be independent of the table name used when using the template to create a page.
    What do you think?

Viewing 10 replies - 1 through 10 (of 10 total)
  • You would be better to have a single Results table and add a field to each record containing the weekly event number. Then all you need to do is filter the records for the required week. That would allow you to have a single page with a search filter so that any weeks results could be viewed.
    Many pages and many tables could become cumbersome to maintain as time goes on,

    Hope this helps

    Michael

    Thread Starter gaetgodi

    (@gaetgodi)

    I like this concept. The menu I would have on the web page would point to this table with a drop-down for the events. The result for a particular event would then show based on my user’s choice.
    How about adding a title to this result with the options to print, export, etc.
    Any help would be appreciated otherwise it will take me awhile to find out how to do this.
    Gaëtan

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    I like Michaels concept! 👍

    Since you are a premium user Gaëtan, you can add individual column search to the weekly event number column and then let the plugin generate a drop down list. That would be the simplest way the manage the data for a specific week.

    You just need to insert the rows for a new week somewhere, but I guess you already have a kind of batch job which does that? 😊

    Does this work for you Gaëtan?

    Thanks Michael!
    Peter

    Thread Starter gaetgodi

    (@gaetgodi)

    Thank you Michael and Peter. I will try both your suggestions, feeling optimistic.

    Thread Starter gaetgodi

    (@gaetgodi)

    Hello Peter,
    I went into Data Explorer and played with the Search options under settings. I was able to click on the columns for search boxes (and their drop-downs). The system calculated the number of items that would be in the drop-down. But no drop-down box appeared, I just got a single search box at the top right. Putting a value there by itself seemed to work for the event column (integer). When I put in user names though the search did not work, I got some selections but they did not seem to be related to the search I was trying.
    What am I doing wrong? How to I get those (multiple columns) drop-downs to be created?
    Thanks,
    Gaëtan

    Thread Starter gaetgodi

    (@gaetgodi)

    Not feeling so optimistic anymore… When editing the searches within setting I just noticed the message saying “this only works within the plugin”. Not sure what that means, the plugin produces project pages, does that mean the searches should work within project pages?
    I specified more than one column for searches, only one drop down was created.
    The main search window seems to work fine within the explorer but not within the page, I think we saw this during our zoom session.
    I will keep working on this in other ways unless you have other suggestions,
    Thanks again,
    Gaëtan

    Thread Starter gaetgodi

    (@gaetgodi)

    Sorry, fiddled a bit more and got a drop down for each column. The drop-downs are always populated, even after pressing clear. This leads to conflicts between drop-downs. For instance, if I want all of a particular event but the name drop-down is populated, I only get that individual.
    Is null a valid value for the drop-down?
    I specified null event and an individual and got the individual even though the event was not null.
    Thanks again, hope this helps,
    Gaëtan

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Gaëtan,

    Good you were able to populate the drop down lists! 😊 The missing null value was reported last week or the week before. It is on my to do list and will be fixed with the next update.

    Best regards,
    Peter

    Thread Starter gaetgodi

    (@gaetgodi)

    I have implemented Michael’s suggestions and all is working perfectly now.

    I have a table called Results_all that has all the results. For those players that did not play on a particular week I had to add the event number to the event column, even though they did not participate their ranking was affected by their absence.
    I stored the event id in the sequence field of the Schedule page. I also modified the page title and sub-title here, to be used in the results area. I also update a Schedules Post which is linked to a generic menu in the Ladder system.
    I used Data Projects with a generic page called Results which I modified to point to Results_all with a where clause that pointed to the Event_id (retrieved from Schedules)
    I modified the post for the result so that it would have the right title (retrieved from Schedules) in its content. I also update a Results Post which is linked to a generic menu in the Ladder system.
    All the calculated user ranks are added to the wp user’s profile area and a Master List is generated from that information.
    The whole system works with just 8 menu items which do not need computer expertise.
    Thank you for all your help, this has been a very pleasant project.
    PS. I have a screen image of the menu items, how do I send that to you?

    Thread Starter gaetgodi

    (@gaetgodi)

    Just another small aside, Code Manager and query builder have worked hand-in-hand throughout this project.
    When a page generated by Code Manager did not work I would output the $sql object and run it directly in query builder. Saved a lot of trouble shooting time.

    Peter, I am looking forward to alterations re the minor suggestions I made about tab in Code Manager. The most annoying one (minor) is the one where I have to reset the Filter Code Type every time I want to open a new set of codes. I have been using the multiple open feature, very helpful, thanks for that.
    Keep up the good work, I know you are busy…
    Gaëtan

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘templates, projects and pages’ is closed to new replies.