• Resolved sirbdc969

    (@sirbdc969)


    I just would like to confirm, because I think I have seen some q&a related to this in the WPDA website comments and in this forum, but I want to be sure… all “forms” back-end and any of the dashboard-published DataProject front-ends are limited to one 2 level hierarchies, yes?

    If I have a table of Books (book_id, book_title) which has a 1:n relationship with a table of Book_Editions (book_id, edition_id, edition_year) which in turn has a 1:n relationship to Book_Edition_Contributors (edition_contributer_id, edition_id, fname, lname). It seems to me, still early in my testing, that there isn’t a built-in way to make a data entry or Master/Child/Child front-end display using just the system out of the box.

    If I make a back-end data entry form to add a Book, I can add one and then go to Edit on it and get a tab for Adding book editions/versions with a year value, which I can do, all good… but to then add authors to those edition records I have to make a new discrete form for the dashboard menu and the user who just added a book with an edition record has to leave the Book/Editions workflow go out to that separate Editions dashboard menu option and search for the Edition record (that they added to the Book form’s child Editions tab) and only then can they add authors to the edition record. Does that workflow match the use case of WPDA?

    I can make it a little easier for users by creating a view for the Edition form so they can see the book title instead of just a grid of record ids and years, but they still have to leave the Books form and go out to that Editions form and search for the Edition record to add that second level of data. Is that right?

    If that is correct and there is a hard limit to data-entry of Master>Detail of just two tables, perhaps there is a way to make it seem like there isn’t?

    In the default back-end forms, not the angular dataproject pretty displays, Is there possibly a way for me to add in a new button on the Book->Editions>Edit screen that can call the Editions form, preloaded with the current Editionid so the users can add authors without manually exiting to a new form and having to search? Technically, it is the same as them calling the Editions form and searching but to the users it “seems” more like it is a complete logical set of steps if the tool does it for them. Darn those users :).

    Not to get confusing, because that is the main question but…

    I’ve tried tricking the system using some views instead of direct tables to get multitable updates in one shot but while some mySQL views are “updateable” they aren’t updatable if they are made by joins so that didn’t pan out. I looked closely at the video tutorial for Many To Many (n:m) forms and thought I saw a potential option because at the beginning of the video the table diagram’s center table “Class” had not only a Students.StudentId and Courses.CourseId but also a varchar Classname column! I wondered how you were going to let the user put a value in that column. But the video didn’t touch that column and when I looked at the SAS.zip demo project I saw that the Classname column was not in the table anymore and there are no Class related features in the demo project except for that link table itself. Stuff happens.

    So: Using the tool for data entry the Hierarchies are limited to 2 levels, 1)Master>2)Detail and that’s a hard limit?

    It is a great system, best I have found for WordPress and has taught me a lot. Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter sirbdc969

    (@sirbdc969)

    By the way, this is not a knock on WPDA at all, I have looked at a number of wordpress and other online based database tools for creating end-user data entry and this appears to be something everyone has in common. One to many = easy. Lots of one to manys off of a main table = easy (you have those pages/tabs). Many To Many wth intermediate cde tables, that thins the herd real quick (yay for WPDA). But more than one level deep? Just seems to be a core limitation. Probably 90+% of sites don’t need it, pizza orders and pizza customers do fine with one to manys. But Books have editions and editions have Authors, Editors, Illustrators and ISBNs and EANs and ASINs; Magazines and Journals have issues with articles that have contributors; TV Shows have seasons with episodes that have writers, actors, best boys. The hierarchies for librarians quickly go farther than Master/Detail. If an “Add Link Button To Jump To Another Form” button setting could be added to the data entry form designer that links a Parent’s child record editor form to another premade form to be auto-filled with the id of the currently active child record… you’d crack a nut that no other tool that I have seen has cracked. You’re using javascript so there are no direct urls for linking to dataentry forms but… maybe something is possible?

    OR maybe this is old news and the answer is so obvious that I missed it (that happens all the time!)

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi @sirbdc969,

    That’s a lot of text! ??

    >>> I want to be sure… all “forms” back-end and any of the dashboard-published DataProject front-ends are limited to one 2 level hierarchies, yes?

    Correct! A master-detail page contains a master table and a detail table. You cannot show more than two levels on one page.

    But … you can add links to other pages that can be master-detail pages as well, which allows you to create more than 2 levels.

    >>> Is there possibly a way for me to add in a new button…

    Yes, that is possible. But not (yet) with the Angular app. If you run your app on the back-end (or with shortcode wpdadiehard) you can use hooks and filters. They are documented here:
    https://wpdataaccess.com/code/

    To add a button before a list table use:
    wpda_before_list_table

    To add a button after a list table use:
    wpda_after_list_table

    To add a button before a data entry form use:
    wpda_before_simple_form

    To add a button after a data entry form use:
    wpda_after_simple_form

    You can also use dynamic hyperlinks to add buttons on master or detail rows. This feature is explained here:
    https://wpdataaccess.com/docs/data-explorer/dynamic-hyperlinks/

    Does this help?

    Thanks,
    Peter

    Thread Starter sirbdc969

    (@sirbdc969)

    Thanks Peter I will look into these options and try to figure out direct urls of prepopulated secondary master records to make life make more sense for the users. Much appreciated.

    Thread Starter sirbdc969

    (@sirbdc969)

    Forgive my extreme ignorance but, where do we use these options? I am very sorry, I come from years of development but not with php/wordpress so I must be overthinking this and my brain is missing the platform-specific jump from “there are these code options that will work” to “here is exactly where you can use them in code files to make them work”.

    I get this: “Use action hook wpda_before_simple_form to add HTML and JavaScript before a data entry form. Argument $self contains a reference to your simple form instance, which allows you to interact with your data entry form through public members and methods.” Great. I get it. It is understandable code.

    But I don’t have the experience to know where to put that code in WPDA’s files to make a button on a WPDA form to call that code – for instance to show a button that calls another form instance into the same or another browser tab. Could someone provide a simple example of where to put the code to show a button that calls code from a specific WPDA data entry form? Again, my sincere apologies for the ignorance. Maybe there is a link that I have missed to a page with a demonstration of using the wpda_ hooks in contenxt? Thanks so much.

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi @sirbdc969,

    Sorry, I should have explained! ??

    Hooks and filters are php code that live outside the plugin. This allows you to add your own logic to plugin pages. Many plugins use hooks and filters to support customization.

    There are several ways to add custom hooks. Many developers use child themes. Just google on this topic and you’ll find many examples and tutorials. Personally I prefer to use the Code Manager (although back-end code support requires a premium license). There are probably other plugins that can do this as well.

    Does this help?
    Peter

    Plugin Contributor Kim L

    (@kimmyx)

    Hi there,

    I’m going to mark this as resolved as we haven’t heard from you in a while.

    Feel free to create a new thread if you have other questions. ??

    Thanks!

    Thread Starter sirbdc969

    (@sirbdc969)

    Sorry, a paying project took me over.

    This reply was not a real help for using this option n WPDA. I know what a plugin is and I know how to make shortcodes and php function files to be used by pages and custom templates in WordPress. But I need to add to a ***WPDA*** data entry form, to add a button that then calls up another WPDA data entry form that is prepopulated with the ID and data of the sub record so we can offer a workflow that is more than 2 relational levels deep. Or does this mean that I should not use WPDA data entry forms at all and just completely code my own data entry forms from scratch? In that case, it’s 1999 again but at least it is going to work :).

    I have paid for the premium unlimited sites version. I guess it is ok to call that the cost of learning and realize that the best route for end-user data entry is to create a real database UI system (using non-wordpress code) and upload the data for dumb data display, but I was hoping to get around that and use WPDA for end users to do their own data entry IN their wordpress.

    I guess what I am trying to get out of the product just isn’t what it (or any wordpress database option) is going to provide. Good to know.

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi @sirbdc969,

    WPDA supports relationships up to two levels out of the box. You can add more levels manually using dynamic hyperlinks. Dynamic hyperlinks are documented here:
    https://wpdataaccess.com/docs/data-explorer/dynamic-hyperlinks/

    The dynamic hyperlinks needs to bring the user to another project. You can add a filter to the project url using url parameters, which is documented here:
    https://wpdataaccess.com/docs/data-projects/adding-filters/

    This works with all project shortcodes and in the back-end. The only disadvantage with Data Forms is that it needs a page request. We are working on a solution which overcomes the page request…

    Is this the information what you are looking for?

    Thanks,
    Peter

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘2 Level Hierarchy data-entry hard limit?’ is closed to new replies.