- 1. What is the Docs picker ?
- 2. Setting up the attachment widget
- 2.1. What are the available options ?
- 2.2. How to use task tags ?
- 3. Setting up the attribute
- 4. Example
1. What is the Docs picker ?
The Docs picker permit users interacting with files from Docs through the completion of a form. You will now be able use files stored in Docs as files in attachment tasks or attributes. As for a classic attachment, you will be able to select a file, a picture, or a folder and join it to your job and/or attach it to an asset (or user, document…) as an attribute.
Prerequisite to use that feature : being a CausewayOne user, and access Field / Form studio through CausewayOne interface (https://one.causeway.com/applications/field or https://one.causeway.com/applications/form-studio).
It is therefore allowing you to completely use Docs as your EDM for all you documents, whatever the type and the size of it.
2. Setting up the attachment widget
This feature consist in a new option on attachment tasks in form. With that feature, you have 2 main options:
- Access local files → Will allow you to select files the classic way. The form propose the user to select local files from his device (stored directly on its own device). With this option, files are then downloaded and stored in Field / Form studio
- Access Docs files → Is the one that we are interested in it, the one that will allow you to select files from Docs. The form propose the user to select files stored in Docs. With this option, every files are uploaded and stay in Docs.
Only one “main” option is selectable : either Docs files, or local files
2.1. What are the available options ?
- Allow files selection for attachments → Permit end user to select files from Docs, and attach them
- Allow files multiple selection
- Selectable items types → Filter on the type of file the user will be allowed to select
- Allow new files upload into Docs → Permit the user to create folders and upload new file directly in Docs, through the picker window
- Allow switch between organisations and projects → In case a user have access to multiple Docs organisations and projects, it will permit him navigating inside them
- Opening location → Define in what location (organisation, project or folder) the picker should be opened to the user
- Allow navigation out of the opening location
To note : the value to put here is the node id of the location in Docs
2.2. How to use task tags ?
Multiple suffixs to add to the attachment task tag are available to get data from the Docs file :
:name
→ get the name of the file (suffix working also with “local” files):docs_id
→ get the id of the selected file:docs_parent_name
→ get the name of the parent folder (or project/organisation if at the root of it):docs_parent_id
→ get the node id of the parent folder
Reminder of how to use suffixes with tags : ##attachments_oscUuThu:docs_id##
These tags could be then used as other tags in the rest of the form, as default value or in the settings of other tasks.
In our case, it’s for example possible to use the docs_id
or docs_parent_id
as the opening location of the next Docs picker.
To note :
These suffixes could also be used in your Custom templates, to get the name and/or id of each file. Ex :
##attachments_oscUuThu:start##
##attachments_oscUuThu:docs_id##
##attachments_oscUuThu:end##
3. Setting up the attribute
Because the attachment task is not only a widget but also an attribute type, you will also find its configuration when creating an attachment attribute through the platform. You will found as for the widget the 2 main options to either select files from local, or from Docs, and only 2 sub options when accessing Docs files : “Allow files multiple selection” and “Selectable items types”.
Other options from the widget are not available on the attribute directly, because considered as “only navigation” options. Meaning that depending on the form you might not want the same behavior. That’s the reason why you don’t find these options at this level, but only in the studio edition of the form.
- In case of multiple selection allowed, it’s only possible to get informations through tag suffixes usage for the last file selected
- Historic on asset attribute value not available for Docs files for the moment
- Not possible to attach Docs files to an email sent through a job
4. Example
Form setup
Let’s imagine that I am an admin, and I want to build a form that will permit site managers to register a new client in CausewayOne.
I want to have the client in Field, as an asset, link that asset to folder in Docs, and also attach files to it so field operators can access them.
- Create a database called “Clients”
- Add 3 attributes to that database :
- A text called “Docs folder id”
- An attachment configured to “Access Docs files” / check option for multiple selection / no selectable items type specified Call it “On field documents”
- An attachment configured to “Access Docs files” / single selection / select only “pdf” in selectable items type’s dropdown Call it “Signed contract”
- Then, create a new document called “Create a client and add files”
- Open the studio, add a Creation widget and select the database “Clients” in settings
- Add and Attachment widget that will permit the site manager to select in Docs the new client corresponding folder. Configure it to :
- Access Docs files
- Allow files selection
- Single selection
- Only “folders” in selectable items type’s dropdown
- Allow new files upload (so the site manager can create a new folder if it doesn’t alreay exist)
- Below, add a Text widget and link it to the asset attribute “Docs folder id”. This task will permit to retrieve the id of the selected folder (useful for future forms and in next tasks)
- In the default value use the previous attachment task tag and add the suffix
:docs_id
to it - Go back to the settings of the Creation widget, and use the tag of the attachment task tag with the suffix
:name
as the name of the asset. It will use the folder name as the asset name. - After “Docs folder id” task, add a new Attachment widget and link it to the asset attribute “Signed contract”.
- Check option to allow new files upload (so the site manager can upload the contract if not already available in Docs)
- Set the opening location with the tag of “Docs folder id” task
- Add another Attachment widget and link it to the asset attribute “On field documents” and call the task Document used on field”. Apply same settings configuration than previous task
- Publish the form
Completing form
What the site manager will see while completing the job :
In the database the client is created in the database :