- BBIEAsked on August 31, 2015 at 09:56 AM
We successfully set up the FTP connection from Jotform. It works great.
We need this function to automatically upload messages and documents to our new document repository in order to include those documents in our workflow on a better manner than only bu mailing the forms to the person in charge of a dossier. We need to integrate this in our workflow.
In the first step, we will only integrate messages related to the "Designs" part of our business. As the documents will be read and treated by Kofax (and only a small part of the messages have to be treated), I would like to filter those documents before sending them to Kofax.
Jotform offers convenient ways to name the documents and the files. The best way is of course the submission ID. Unforutnately, this is not meaningful and cannot be used for selecting incoming messages.
I tried to add a calculated field (combining the subject and some meaningful information related to the incoming message. This works fine, except that I cannot select a calculated field for creating the folder and files on the FTP server.
Do you have any suggestion?
- CharlieAnswered on August 31, 2015 at 01:17 PM
I assume what you meant is that you would like a custom name for the folder and PDF submission transferred to your server via FTP. Is that correct? You can use Unique ID widget for that:
The good this with that is that it auto increments so each ID is unique. Here's a guide on how to setup your FTP submission: https://www.jotform.com/help/177-How-to-Enable-FTP-on-Form-Submissions
However, if you want to use the fields in the form for naming, it's possible by following the quick guide below:
1. First, add the "Submission Counter" widget, you'll use it as that will auto increment.
2. After that, I will setup the radio button field as "Type", I will use "Option1" and "Option2" in naming my folders and PDF submission.
3. I then used the Form Calculation widget to combine the "Submission Counter" widget + the answer of your user in the field named "Type" which is a radio button.
In the "Calculation Wizard", choose the "Type" field and the "Submission Counter" using the "Add Field" button. You'll notice that the "Type" field is in gray color, this means that it will output a value as a text value. To change the type of value of the field, you just need to click the "0-9" or "a-z" shown at the top of the field. I added "-" in between to easily separate the two.
4. I will then use conditional logic to output the value in the Form calculation in a plain text box. In my case, when the "CombinedID" field is filled out, then output it's value in the text box named "Output".
Now navigate back to the FTP setting and you'll see that the text box is now available to use as the name for folders and PDF submissions. You can also use DateTime as another autoincrement value.
I hope that helps.
- BBIEAnswered on September 01, 2015 at 04:51 AM
Thanks a lot. This certainly helps.
The conditional logic seems to do the job. However, the submission counter is visible on the form (for test purposes, of course...) but does not seem to be taken into account in the formula. So I see a 12 in the submission counter on the form, but it becomes a 0 in the calculated field.
This is not a major issue as I can use other fields to make each submission unique.
Thanks a lot for this detailed tutorial
- CharlieAnswered on September 01, 2015 at 09:17 AM
I'm glad it somehow helps. Regarding the "Submission Counter" widget, it seems like it doesn't load properly when used as an object in the conditions. You might indeed need to use a different field for naming convention. But I can try to look for another way on how we can get an auto-incremented value, but I might need some time to research this.
- BBIEAnswered on September 01, 2015 at 09:25 AM
I am more than satisfied b now.
We use some mandatory fields (like the number of the registrations) in our forms. A combination of the product, the number and the date/time gives a unique key for everything.
I noticed that the date is shown as yyyy/mm/dd, even if the separators in the field date are :
This was first annoying, because I only saw the year in the path. And when I realized that a / creates a subdirectory, this opened a new world of possibilities.
I even tried to start the name of the directory with ../ hoping it would bypass the name of the form in the directory structure. It does indeed, but it only inserts attachments in the created directory and not the message (in PDF) itself. I would like all my messages (+ attachments) I need for our electronic archive to go to the same directory (for instance Kofax, and not Form1/Kofax..., Form2/Kofax, etc)
If this was working corretly, I would be the happiest Jotform user in the world (although I guess I already am)...
- CharlieAnswered on September 01, 2015 at 10:49 AM
Thank you for sharing your findings, that's actually pretty cool.
If I understand you correctly, when you use a custom name with "/" on it, it creates a sub directory in the FTP, but it only saves the attachment in the created subdirectory and not including the PDF submission, is that correct? Perhaps a sample test submission and a screenshot of the folder structure would help us understand further?
I'll try making a test submission in my end, although I'm not sure how the form and process flow works in your end.
- BBIEAnswered on September 01, 2015 at 11:31 AM
What I mean is if I use a / within the name of the field used to determine the FTP directory, it creates automatically a subdirectory. This is no problem.
This subdirectory contains all needed things, message and attachments.
The path is then in my case:
JotFormDocs/Name of the form/Kofax/Designs/Number of the design.
(JofFormDocs being the root directory I added in the FTP settings in submissions).
I added in the rule "Kofax/Design"+ the name of the field containing the number and I added the time in numeric form (otherwise it adds slashes and creates new subdirectories).What I tried next was to add ../Kofax/Designs instead of /Kofax/Designs.
The result seems perfect. The directory structure becomes
JotformDocs/Kofax/Designs/Number of the design.
Exactly the structure I was looking for. But in that case, the directory remains empty if there is no attachment.
Here is the condition I use: (without the ../)
I hope this clarifies the situation.
- CharlieAnswered on September 01, 2015 at 01:59 PM
I'm not sure if this will work for you, the problem is that, by default, the submission will automatically create a folder based from the form itself.
So the solution that I have in mind is changing the name of the form to "Kofax" instead.
In my conditional logic, this is now how it looks like, I just removed the "Kofax":
I then made a test submission, this is the first one:
You'll see that my root directory is "JotformDocs", "Kofax" is the name of the form.
I then made a 2nd test submission:
I tried with and without a file upload field, both the PDF submission and the file upload/attachment went through:
I'm not sure if making the form titled to "Kofax" would be useful for you, you might have other forms that you want to upload on that same folder. But for now that's the current workaround I have in mind. I hope that gives you an idea on how to proceed.
- BBIEAnswered on September 02, 2015 at 02:09 AM
Thanks again for your quick reply.
Unfortunately, this option is not possible for us. We have in fact 3 forms producing the same output. This because we manage 3 languages.
The problem is not so much that the name of the file is automatically inserted (this is easy to work around by using ../ in the begin of the path). Jotform crates the correct directory:
JotformDocs/Kofax/... (thus without the name of the form in between).
Problem is that in that directory only the attached documents are stored. Not the original message.
I am afraid that we have to find the solution at the Kofax side for the time being.
- CharlieAnswered on September 02, 2015 at 09:42 AM
Thank you for the information. I made some test setups, but I can't seem to find a workaround on it. It looks like the submission needs the to have an actual folder for the form itself in the directory for the PDF submissions to be successfully transferred.
I'm not that quite familiar with shell scripts, but I think it's something that might be another option, you can try running that type of script in your server that will re-arrange folders or move them in a different directory. Perhaps this thread link I found on the internet might be a good start?
I hope that helps.
- BBIEAnswered on September 02, 2015 at 09:46 AM
I guess we will solve the problem (as far as there really is a problem) with Kofax, who will need to access 3 directories instead of just one. I do not think this will be a major issur.
It would have been nice if Jotform could do the job, but if you cannot (and I perfectly understand why), it should be OK too.
I already achieved much more than I expected when I started testing the FTP function.
Thanks again for all efforts
- BBIEAnswered on September 03, 2015 at 03:11 AM
The system was working fine for a few days. But I guess we have now a major issue!
We white-listed 16 IP addresses in our firewall. This are the Jotform IP addresses you comminicated me + a few new ones we discovered.
From today, 2 new IP addresses are usedbu Jotform. They are not in the same range, so this looks strange.
Here are the addresses : 188.8.131.52 and 184.108.40.206
If the IP addresses are continuously changing, this will not be manageable for us !
Is there a possibility to limit those IP addresses to the ones we know? Otherwise we cannot build any secure connection.
Many thanks in advance
- BorisAnswered on September 03, 2015 at 09:10 AM
As this is now a separate issue to the topic of this thread, and so that I am able to forward it to our higher ups - your last question has been moved to its own thread:
It will be tended to there, shortly. Thank you.