Record from one section to be automatically copied to a new record on another section
2 posts by 2 authors in: Forums > CMS Builder
Last Post: May 11, 2016 (RSS)
By andreasml - May 10, 2016
Hi
I have a section named "General Data" which includes some basic data regarding patients (patient id, name, date of birth, type of treatment). I have also created different sections, each one for a different type of treatment (Treatment A, Treatment B, etc) which includes the previous details (patient id, name, date of birth, type of treatment) but also other specific details regarding this type of treatment.
How can i make CMSB to insert the data typed in the "General Data" section for a patient, into the relevant Treatment table, automatically? In other words, when the user completes the creation of a new record in the "General Data" section by pressing the Save button, then these data will be inserted in a new record in the relevant fields of the relevant Treatment section. Ideally, these initial basic data should not to be possible to be modified by the user, except from the Administrator
Any help would be much appreciated
Andreas ML
By ross - May 11, 2016
Hi Andreas
Thanks for posting.
Through consulting, we can create you a custom plugin that does everything you listed here. What you are going to end up with, though, is a lot of duplicate data. This makes it pretty tricky to update anything once you create the original record(s).
Does that seem like it would be an issue? IE: once you create a record in "General Data", will you ever need to update any of the data in that record?
If the answer is "No, once I create a record in "General Data", I will never need to update it", the custom plugin will work. You still end up with duplicate data but it isn't too big a deal because you aren't updating anything.
If the answer is "Yes, I will need to update the "General Data" record, I recommend looking at putting a "user id" field in each of your treatment sections and having that list each of the records in your "General Data" section. Then when you create a new General Data record, the plugin we create will only assign a "General Data" ID to the treatment record instead of filling out all the other applicable fields.
Does that make sense?
Either way, I think we are going end up with a custom plugin through consulting and to get the wheels in motion on that, you can email consulting@interactivetools.com
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com
Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/