The WrapLinkMedia function

ExcelWraps allows visitors to upload documents, images, and other media files with a wrap instance using the Media Upload widget. A separate wraplink called WrapLinkMedia allows you to link to and view the uploaded media content also in other wraps.

The WrapLinkMedia function pulls media files from another wrap instance.

Example: A wrap called Inspection has a Media Upload widget in a cell named damages_photos. If you want to show the uploaded images also in another wrap, say InspectionReport, you insert a WrapLinkMedia function in the report wrap that links to the damages_photos cell in the inspection wrap, selecting the right instance with Unique Keys.

The Audit Trail

A handful of technical events related to the WrapLinkMedia function are logged in the Audit Trail.


The designated wrap instance exists and has media

The WrapLinkList function creates a media gallery showing the currently selected image with a row of thumbnails for navigation.

Screenshot of a Media Upload widget with media

The designated wrap instance exists but has no media

If a WrapLinkMedia function links to an empty media upload widget, it shows a placeholder.

Screenshot of the icon for the WrapLinkMedia widget

The designated wrap instance does not exist

A WrapLinkMedia function may link to a wrap instance that does not exist. In most cases, this is an error caused by incorrect Unique Keys. If this happens, the WrapLinkMedia function shows a placeholder. There is no error message.

Screenshot of the icon for the WrapLinkMedia widget

Function reference

Screenshot of the WrapLinkMedia function call


In the example above, the following cell formula is inserted in the cell.


In this example, the developer has inserted a cell reference for the inspection_id.

Format and parameters


link is a quoted text string that identifies the wrap you want to link to, provides the Unique Key for the single wrap instance you are selecting and the name of the Media Upload widget you want to be returned from it.

Link parameters

The parameters for a link are specified in the query string. The query string is appended to the wrap name following a question mark. Within the query string, parameters are separated by ampersands. In the example above, the query string begins with a question mark and sends two parameters to the source wrap: inspection_id and filter-med-list.

Wrap name

The link starts with the name of the wrap you want to link to, e.g. inspection in the example above.

Components of the Unique Key, e.g. inspection_id=

The link must contain the full Unique Key that selects the single wrap instance you want to link to. The Unique Key is usually assembled from several values, e.g. for a bogie overhaul you may need to identify the unit number, the car type, what bogie on the car you refer to, and the mileage interval for the overhaul. You specify the components of the Unique Key using the field names that the wrap is using for these values. In the example above, the Unique Key is provided by the inspection_id parameter.


If the wrap you link to uses the AutoNumber feature, you can designate any numbered instance using the autonumber parameter in the wraplink function call, e.g. autonumber=42. You can use autonumber=first or autonumber=last to link to the first or last existing instances. If you specify an autonumber that does not exist, ExcelWraps will offer to create the corresponding wrap instance for you. To explicitly request that a new instance is created, use autonumber=*. A grey plus button will appear in the WrapLink field. If the user clicks on the button, a new instance of the linked wrap is created. No data is pulled from the new instance and no link to it is created. The AutoNumber must be the last part of a unique key combination.


The filter-med-list parameter returns a Media Upload widget from the selected source wrap instance.  After the call has been made, the media in this Media Upload widget for the designated wrap instance will be visible in the cell where the =wraplinkmedia() function call resides. There are a few special cases; read more under Results above.

We recommend that you make the width and height of the cell with the WrapLinkMedia function identical to the size of the Media Upload widget in the wrap you link to. This ensures that the media are displayed in their optimum size. For more information on how to resize cells, please read the Introduction to using widgets.

Conditional request

WrapLinkMedia is a top-level function and cannot be nested inside another function like IF. If you want to make the function call only if a certain condition is True, you can place the IF statement around the link: