I can’t seem to find any help on this nor figure it out myself. We are working on setting up a COTG process which is basically a bill of lading. It gets printed from our system, PP captures it and send to COTG as a web context that extracted the item list for delivery and such along with the form fields (signature). Once the delivery happens, the user gets the customer to sign the form. Here’s where I lose it. So we have a fully developed form that shows data about the delivery and contains the signature field, how do I then print that out back at the office?
When reviewing what get’s returned by COTG it appears to only be an xml containing the fillable form fields and not the rest of the content on the form itself. How does the entire form get rebuilt in order to process it in other ways such as printing or saving as pdf? I’m not sure how to get the data from both the original print and the xml submission and use it. Not that that makes much sense to me anyway, if the form is already created why should it have to be recreated at all? Shouldn’t this be able to grabbed in some way just to print it?
Thanks for any suggestions! Really confused on how to do this.
When you receive that incoming XML file, you would run it through a new datamapper and create a new output. You may even use the same Template, but obviously the print output would use the Print Context in the template whereas the initial form would have been using the Web Context.
It’s returned like this (just the data from the form, not the form itself) to give you the flexibility to do whatever you want with it, without being locked into outputing a print version of whatever form you’ve created for viewing on a mobile device.
I would highly recommend that you download and install the COTG Demo Package available here: Resource Center | Objectiflune
It even contains a sample Bill of Lading process, so you could reference that for more information.
Important Note: Do not run that COTG Demo installer on your production environment. It will overwrite your current configuration. It’s meant for use in a Dev environment and you will obviously want to back up whatever configuration you’ve currently set in that environment.
I have already been reviewing that BOL demo quite a bit but it isn’t helpful in this because all it uses is the form field data to create an email. It doesn’t reference both that AND the original form data displayed.
What I don’t understand is how to actually go through the creation of the new template, data mapper and print context because all i have is the xml to work with. The basic question is…how do I recreate exactly what you see on the screen in COTG in order to print that out?
Is it possible to use 2 data mappers for 1 template? (the original data mapper we have for the create web content and now the xml) Maybe that is the question I need help with as that seems to be what is preventing me from recreating.
Thanks!
A Template can be used with any number of Data Mappers, so long as the Data Model used in each Data Mapper is identical.
To do this, open your first Datamapper (datamapperA). You’ll see buttons next to your Data Model as in the image below. 1 is Export and 2 is Import.
Once you’ve exported your Data Model, you can create a new Data Mapper based on that XML file as input data and import your old Data Model. Remap the values to the appropriate fields and that’s pretty much it.
One thing to note, obviously you’ll be getting some data back that you didn’t have before (the signature) so if you want to add a new field to this datamapper to accommodate that, you’re going to have to re-sync your data models to DatamapperA and to your original Template.
I think that makes sense but I’m not sure how to get both data streams into the data mapper before creating the content. So i have DM1 (pdf) and DM2 (xml) that are now both in one data mapper but need to reference the pdf and xml. This is what I have right now but i’m getting an error in COTG (403-forbidden) and the html file that is created (it completes despite the error) is only showing the data in the xml, not both that and the pdf. How do I bring in both data files?
Thanks!
Sorry, I think I misunderstood your initial question.
You can’t run two data mappers and then generate content on that.
You can have one template that is able to use 2 data mappers, but only 1 at a time.
Outgoing, you’d have one datamapper and one create web content (as you already did before) that generates the form for COTG.
On input, you have a new datamapper built for the incoming XML data, a Create Print Content step, create job, create output. (This is assuming you want to print this or create a PDF from the incoming data)
In this Create Print Content Step, you can reuse the same template (packingListCompleted) ONLY if it has a Print Context. If you go this route, you must also have the datamodels matching between your 2 data mappers and template.
It may be simpler for you, however, to simply create a new template that you’ll use with the incoming data.
As noted, this assumes you want to print or generate a PDF.
Using the input xml is not the issue, but it doesn’t serve much purpose if it isn’t WITH the data that was on the form to begin with. How can i possibly create a print of the complete form if I can’t bring in both sets of data?
Maybe if i phrase it another way it’ll make sense. I would think my example is exactly what COTG is used for but yet so far it doesn’t seem to be allowing anything useful at all. So I have a bill of lading (customer info, list of items etc) that was created as a web context with a data mapper pulling from a pdf that is printed. With that data we add a few form fields in order to collect a signature that the customer accepts what was delivered. So once the form is signed and submitted, I want to process it in some way. Print is a good example. naturally I want to print it out with all of the detail…customer info, list of items AND the completed form fields such as signature.
If all I can use is the incoming xml (which only contains the form data, not the entire web content), then how can i possibly recreate the print with all the detail?
In my screenshot example above, i’m just sending the html to a folder. The result is an html of the form, which is what I want, but it doesn’t have the data on the page such as customer info, item list etc that was brought in to the web content output…it only has the xml form fields on it now. The rest of the layout is what i want but I need to bring in both data sources.
I find it very hard to believe that this isn’t possible. Hopefully what I’m asking makes more sense now. Thanks again!
Maybe this will help too…
Take the BOL demo as an example. I want to take that exact html that you see on the COTG app and then print it, or save it as html or whatever, with the now filled out signature.
2 data sources…
You’ll need to eliminate the concept of using two data sources. You don’t need to.
When you send up your form to COTG with all of the customer information displayed on the page, you can also include all of that information in Form elements hidden from view on the page. This way when the COTG app returns it’s XML file, all of your original data is there, waiting to be used.
What is frequently done is to encode all of that data into a single JSON string and store it in a single field on the form. When you get the XML back, you just have to parse that JSON string to get all of your data back out.
Going this route, you have a single data source that contains all of your original data, plus the new data submitted by the form (signature) and it can all be passed into a new template to generate whatever output you need.
Gotcha. That was the alternative plan. I just figured there had to be a much simpler way to accomplish it. We’ll work on that then.
Thanks