Details—add columns to display
Details mode allows you to have additional columns of data in your Document Portal. You can leverage this to list out some additional data that pertains to the associated file. For example, if you add the Type field to your details, the Document Portal grid shows a Type column between File Name and File Size (KB), with each file's value from its details record:
File Name | Type | File Size (KB) |
|---|---|---|
twelve.png | Location Photo | 92.7 |
two.png | Receipt | 31 |
zero.png | Document | 228.4 |
These are the same values you see in the Type field on the details records in Quickbase.
You can add nearly any field types to your columns, except for the following: iCalendar, vCard, ReportLink, Predecessor, and File Attachment. You can choose any other type of field to display, although there are further limits for editing fields (discussed in Editing Records).
Some columns are always read-only in the portal, even if they can be edited in Quickbase: User, List - User, Rich Text, Address, and Record ID# fields, and Quickbase's built-in fields (field IDs 1 to 5, such as Date Created and Date Modified). Formula, lookup, and summary fields are read-only too, because they can't be edited in Quickbase.
How to add columns to the grid display
In order to add/change the columns displayed in the Document Portal, you need to change the formula field you are using to launch the Document Portal. In Quickbase, open the field properties of the Document Portal field on your parent table and edit its formula. Inside the formula, you need to identify the detailsclist parameter. The installation wizard puts all parameters inside Base64Encode( ), so a formula created by the installation wizard looks similar to the following, with the detailsclist parameter on its own line:
var Text url = "https://..." // your Document Portal server URL, created by the installation wizard
& "request="
& Base64Encode(
"clientid=Q1234"
& "&appid=" & AppID()
& "&dbid=" & Dbid()
& "&cloud=s3"
& "&msid=" & [Record ID#]
& "&clouddirectoryfid=11"
& "&clouddirectory=" & [Document Portal Directory]
& "&cloudbasedirectory="
& "&details=true"
& "&detailsdbid=" & [_DBID_FILE_DETAILS]
& "&detailsrelatedkeyfid=6"
& "&detailscloudkeyfid=9"
& "&detailsnamefid=27"
& "&detailssizefid=28"
& "&detailstypefid=29"
& "&detailsuploadedfid=30"
& "&detailsclist=10.11.12"
);
"<a class='Vibrant Success OpenAsPopup POSTTempToken' style=\"\" data-height=600 data-width=800 data-refresh=true data-tempTokenDBID='" & Dbid() & "' href=\"" & $url & "\" >Document Portal</a>"If you don't have this parameter, add & "&detailsclist=" to your formula, as that is where you define the columns. Put it inside Base64Encode( ), on a new line before the closing );. Anything outside Base64Encode( ) is ignored. The wizard also creates a Document Portal - Mobile button with the same parameters; change its formula the same way so both buttons show the same columns.
The basic way to utilize this column list (abbreviated to clist) is to list out the Field IDs of the fields in the desired order, separated by periods. For the above example, we're stating that we want Field 10, Field 11, and Field 12, in that order.
We can customize this further, but it will be more advanced. There are several more settings per column: Width, Read-Only, Fill-Out, Fill-Out Default Value, Related Proxy Choice Field, Required, and Hidden. We will discuss how to set these values after their description:
Width - This is the default Column Width when you open the Portal. We don't put a limit on this, but keep in mind that using large values may break the user experience. Set to any integer number, for example, 100.
Read-Only - If the field is normally editable on Quickbase, then it is editable in the Document Portal (given edit is turned on). If you want a specific column to default to being Read-Only, set this to true. Otherwise, you can leave it blank, or false.
Fill-Out - When uploading new files, you may want to set a value for a given column for all of the records, instead of having to go and edit them after the upload. Setting fill-out to true marks this column for being asked for Fill-Out. This is described in more detail on Details—pre-populate new records.
Fill-Out Default Value - If fill-out is true, then you can specify a default-value to be entered into the input with this feature. You should be careful with how data is supplied to this, as discussed below.
Related Proxy Choice Field - If the field is a relationship field, like Related Project, then you can specify the Field ID on that related table to grab choices out of. For example, if you had Related Project which is a number, but wanted the possible choices to be Project Name, then you can set this to the Project Name Field ID.
Required - If the field is being filled out by the end-user, force them to enter a value before they can upload.
Hidden - Hides the field from the column. This is mainly used while trying to default values for details records without showing them to the user. Use this along with setting Read-Only to true, Fill-Out to false, and Default-Value to whatever value you would like to fill.
All the advanced settings above are also put into the detailsclist, but colon delimited after each Field ID. For example, let's say you had clist 10.11.12, and wanted to set column widths for each. The new clist could be 10:100.11:200.12:300 where Field 10 has 100px width, 11 has 200px, and 12 has 300px.
So, a blueprint would be FieldID : Width : ReadOnly : FillOut : FillOutDefaultValue : RelatedProxyChoiceField : Required : Hidden—where you only need to supply up to what you need, and leave the rest blank. For example, a valid clist where you only want Read-Only and don't want to specify width would be 10::true.11::true, where both fields are being set to Read-Only.
Another example could be if you want Width, and to turn Fill-Out on for only the first field, 10:150::true.11:200, note that we had to still put colons for Read-Only even though it was unused for the first column.
Fill-Out Default Value also needs some special modifications—because we use periods and colons to delimit the properties, whatever default value you are supplying cannot have periods or colons inside. For this reason, if you are supplying some field that could possibly contain either, we suggest you use the following code in your formula:
SearchAndReplace( SearchAndReplace( [Account Number], ":", ";;;"), ".", ",,,")
Where [Account Number] is whatever field you want to replace. In the context of the formula, it may look like this:
& "&detailsclist=10:::true:" & SearchAndReplace(SearchAndReplace([Project Type], ".", ",,,"), ":", ";;;") & ".11:::true.12"
which means that Field 10 is filled out, and defaulted to whatever is in the Parent Record's [Project Type] field, and Field 11 is filled out with no default, and Field 12 is added.
If a Field ID in the clist doesn't exist on the details table, the portal shows an error when it opens. See Document Portal messages and troubleshooting.
We understand that defining this clist may be difficult, so submit a technical support case if you have any questions.