{"id":10259,"date":"2023-01-17T08:57:28","date_gmt":"2023-01-17T07:57:28","guid":{"rendered":"https:\/\/help.metashare.com\/?page_id=10259"},"modified":"2026-05-08T23:12:48","modified_gmt":"2026-05-08T21:12:48","slug":"links-to-new-document-form-with-a-suggested-name-and-prefilled-values","status":"publish","type":"page","link":"https:\/\/help.metashare.com\/en\/metashare\/usermanual\/add-documents\/links-to-new-document-form-with-a-suggested-name-and-prefilled-values\/","title":{"rendered":"Links for creating documents with  suggested name and preselected properties"},"content":{"rendered":"\n<p>The &#8220;New document&#8221; form in MetaShare can be opened using a link to the workspace with special parameters added at the end of the URL. This allows saving frequently used property combinations and creating new documents with correct properties faster. Additionally, name field can be prefilled with a suggested value. This can be achieved by adding another parameter followed by the suggested name. These links can be bookmarked or included in other solutions, for example on intranet pages.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Format of the filename prefilled in the &#8220;New document&#8221; form:<\/h2>\n\n\n\n<p>Name field can be prefilled with any text, but to ensure unique filenames it should include special tokens which will be replaced with relevant values. Currently you can use the following tokens:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>{template} \u2013 will be replaced with the name of the selected template<\/li>\n\n\n\n<li>{date} \u2013 will be replaced with the current date<\/li>\n\n\n\n<li>{time} \u2013 will be replaced with current time<\/li>\n<\/ul>\n\n\n\n<p>For example, if suggested name is defined as \u201c<strong>Some name \u2013 {template} \u2013 {date} {time}<\/strong>\u201d and a template \u201cReport.docx\u201d is selected, the newly created file will be named \u201c<strong>Some name \u2013 Report \u2013 2023-01-10 15.11<\/strong>\u201d.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Creating a document with suggested names:<\/h2>\n\n\n\n<p>Whenever a link to create a document is used, the workspace will open with the form to create a new document and prefilled with any values included in the link. The name field will contain suggested name and if any tokens were used, the name with replaced tokens will be displayed below the field:<br><img loading=\"lazy\" decoding=\"async\" width=\"581\" height=\"605\" class=\"wp-image-10275\" src=\"https:\/\/help.metashare.com\/wp-content\/uploads\/prefilled-name1-1.png\" alt=\"\" srcset=\"https:\/\/help.metashare.com\/wp-content\/uploads\/prefilled-name1-1.png 581w, https:\/\/help.metashare.com\/wp-content\/uploads\/prefilled-name1-1-288x300.png 288w\" sizes=\"auto, (max-width: 581px) 100vw, 581px\" \/><\/p>\n\n\n\n<p>If the suggested name contains {template} and no template has been selected yet, an error message will be displayed instead:<br><img loading=\"lazy\" decoding=\"async\" width=\"577\" height=\"612\" class=\"wp-image-10277\" src=\"https:\/\/help.metashare.com\/wp-content\/uploads\/prefilled-name2-1.png\" alt=\"\" srcset=\"https:\/\/help.metashare.com\/wp-content\/uploads\/prefilled-name2-1.png 577w, https:\/\/help.metashare.com\/wp-content\/uploads\/prefilled-name2-1-283x300.png 283w\" sizes=\"auto, (max-width: 577px) 100vw, 577px\" \/><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Building a link to the &#8220;New document&#8221; form:<\/h2>\n\n\n\n<p>Links can be built by adding <strong>$dialog=new<\/strong> and <strong>$filename=SuggestedName<\/strong> at the end of the URL of the workspace where documents should be created. To create a link follow these steps:<\/p>\n\n\n\n<ol style=\"list-style-type:1\" class=\"wp-block-list\">\n<li>Open the workspace where documents are supposed to be created and apply any filters that should be used as default values for new documents:<br><img loading=\"lazy\" decoding=\"async\" width=\"1332\" height=\"682\" class=\"wp-image-10273\" src=\"https:\/\/help.metashare.com\/wp-content\/uploads\/preselected-filters-1.png\" alt=\"\" srcset=\"https:\/\/help.metashare.com\/wp-content\/uploads\/preselected-filters-1.png 1332w, https:\/\/help.metashare.com\/wp-content\/uploads\/preselected-filters-1-300x154.png 300w, https:\/\/help.metashare.com\/wp-content\/uploads\/preselected-filters-1-1024x524.png 1024w, https:\/\/help.metashare.com\/wp-content\/uploads\/preselected-filters-1-768x393.png 768w\" sizes=\"auto, (max-width: 1332px) 100vw, 1332px\" \/><\/li>\n\n\n\n<li><a href=\"https:\/\/help.metashare.com\/en\/usermanual\/how-to-share-a-document-or-a-document-view\/#share-links-to-document-views\">Copy the link to the document view<\/a>.<\/li>\n\n\n\n<li>If no filters were selected and URL doesn&#8217;t contain the \u201c<strong>?<\/strong>\u201d character, add this query string at the end of the URL:<br><code>?&#x200d;$dialog=new&amp;$filename=<\/code><br>If the URL already contains the \u201c<strong>?<\/strong>\u201d character, add this query string:<br><code>&amp;$dialog=new&amp;$filename=<\/code><\/li>\n\n\n\n<li>Add your suggested filename after the \u201c<strong>$filename=<\/strong>\u201d query string. The complete link could then look something like this:<br><code>https:\/\/app.metashare.com\/3490a127-0702-4566-bbdf-f2da71901488\/workspaces\/5788?DocumentType=04e200ed-d009-4b5f-9cb9-dbbf916f8898&amp;Project=2126a12f-e37e-4fae-8728-947a556c7517&amp;Projectphase=7cdd2ea6-e9cf-40fa-95d8-8d758d8060a1<strong>&amp;$dialog=new&amp;$filename={template} - {date} {time}<\/strong><\/code><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>MetaShare user guide: links to new document form with a suggested name and prefilled values.<\/p>\n","protected":false},"author":9,"featured_media":0,"parent":10666,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":{"0":"post-10259","1":"page","2":"type-page","3":"status-publish","5":"no-featured-image-padding"},"_links":{"self":[{"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/pages\/10259","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/comments?post=10259"}],"version-history":[{"count":16,"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/pages\/10259\/revisions"}],"predecessor-version":[{"id":12440,"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/pages\/10259\/revisions\/12440"}],"up":[{"embeddable":true,"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/pages\/10666"}],"wp:attachment":[{"href":"https:\/\/help.metashare.com\/en\/wp-json\/wp\/v2\/media?parent=10259"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}