Jump to content

Dynamic User Documents with Versions


Jim Bailie
 Share

Recommended Posts

Hello All,

I would like to accomplish this the PW way, but again, I'm struggling conceptually and don't want to burn days experimenting.

So now the people signing the checks want users to be able generate dynamic documents. There are 50-70 documents to chose from and they all will have between 5 and 40 fields...and they need to create multiple versions of each document...repeatedly.

  • /john/2019/6/28/tpr-report/v1/
  • /john/2019/6/28/tpr-report/v2/
  • /john/2019/6/28/tpr-report/final/
  • /john/2019/6/28/stfu-report/v1/
  • /john/2019/6/30/stfu-report/v2/
  • /john/2019/6/30/stfu-report/final/
  • /mary/2019/6/29/wth-summation/final/
  • /mary/2019/6/29/tpr-report/v1/

What I do know is that I will need ProFields and will be purchasing that. I also know that the reports will need to be their own templates...but the dates and the versioning are the problem for me.

Thank you in advance for any guidance!

P.S. Would one of the blogging modules be a good fit?

Link to comment
Share on other sites

Not sure about the blogging modules, as I don‘t know them. 

For me this looks like a good fit for urlsegments. Look up the API docs for it, I‘m on mobile.  

Using this, each of your docs template additionally need a date field, if the user should be able to specify the version date manually. If it should be assigned in an automated way, you can use the page creation_date, (or modified one). 

 

  • Like 1
Link to comment
Share on other sites

I'm not sure your questions, though.

For dynamic documents such as tickets, enquiries etc, I always use this format for page name to make it easier:

date("ymd-His")."-".$user->id."-"custom-name or updated version

it will avoid a clash page names and easy to find them for future use.

  • Thanks 1
Link to comment
Share on other sites

@horst Url segments look like they're pretty easy to manage and a date and date-created field will serve as an index so to speak.

@monchu Yes! I think a single, uniform, parse-able url segment is the best approach. I know the client wants the urls to look like what's in the initial post, but that seems hokey to me.

Now here's a follow-up question: 50+ document templates with 5-40 fields each is going to add up to A LOT of fields...even if a good handful of them will be shared.

Does ProFields offer a way to "consolidate" these fields without adding too many tables to the DB? It seems like it would...

Link to comment
Share on other sites

1 hour ago, Jim Bailie said:

Does ProFields offer a way to "consolidate" these fields without adding too many tables to the DB? It seems like it would...

Yes it does. For example I often use the Textareas ProField to collect a lot of small textpieces in separate inputfields, but it creates only a single table in DB. On the screenshot you see two db fields / tables, contact and map:

pw-profield-textareas.thumb.jpg.c5db87c91584e77fd243c685f53efcdb.jpg

  • Thanks 1
Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...