Page 1 of 1

Document Management in Livecode

Posted: Mon Sep 12, 2016 3:07 pm
by nrprioleau
I am nearing the end of my app build but one last thing I have to achieve is to allow users to "attach" documents to a record. For instance, on a purchase, I'd like to link or attach Purchase Orders, Supplier Invoices, etc to a record. My app is built using mySQL. I would assume the best way would be to create links to folders and files? If anyone has done this before or has any guidance for me, I would be very grateful.

Re: Document Management in Livecode

Posted: Tue Sep 13, 2016 4:33 pm
by Lagi Pittas

I'd suggest a text field in the mysql database with each line having the name of the invoice,statement etc in there. No need for the full path in most cases as you can have the fulll path tacked on from a configuration file. I would also have say a comma or pipe symbol at the end so that you have 2 items or maybe 3 per line like this


Very easy to code and very easy to find all invoices printed on a certain day from all customers without going through all the files.

You could also add a 3rd item "archive-2015" , archive-2014 etc which would be a pointer/directory name to an archive directory broken down in years for when you want to cleanup the main files from one place top another.

The beauty of this way and Livecode's item delimiter is that you could add stuff in the future without breaking any code for instance a pointer to the header record of the invoice or a total for the invoice itself.

Or if it's not an invoice but you are saving word docs - the salient/important words in the docs so people could scan for example and find all documents with the words "European Community" in them. That final one isn't the way I would do that in practice - there are much better ways such as an inverted index but you get my drift.


Re: Document Management in Livecode

Posted: Thu Sep 15, 2016 9:05 am
by nrprioleau
Thanks Lagi,

That has definitely given me something to work on. I may check back with you if I run into any trouble.