{"id":1152,"date":"2011-10-07T13:04:15","date_gmt":"2011-10-07T18:04:15","guid":{"rendered":"http:\/\/www.mrc-productivity.com\/legacy\/?page_id=1152"},"modified":"2017-06-12T12:12:18","modified_gmt":"2017-06-12T17:12:18","slug":"maintenance-redirection","status":"publish","type":"page","link":"https:\/\/www.mrc-productivity.com\/legacy\/maint\/maintenance-redirection","title":{"rendered":"Maintenance Redirection"},"content":{"rendered":"<h1>Redirecting from a Maintainer<\/h1>\n<p>Occasionally you may want to redirect to another page after a user has performed an action within a Maintenance application (such as Update, Delete, or Add). One of the most common uses of the redirect is after a user fills out a form. Once they have completed and press the &quot;Accept&quot; button, developers desire to automatically redirect them to a confirmation page.<\/p>\n<p>This is easily done from the Application Properties screen. From the Application Menu, access the Application Properties, then click the After Actions tab. Here you will find four properties related to redirecting:<\/p>\n<p><strong>add_redir:<\/strong> This will be the URL to redirect to after <strong>adding<\/strong> a new record successfully.<br \/>\n<strong>upd_redir:<\/strong> This will be the URL to redirect to after <strong>updating<\/strong> a record successfully.<br \/>\n<strong>dlt_redir:<\/strong> This will be the URL to redirect to after <strong>deleting<\/strong> a record successfully.<br \/>\n<strong>all_redir:<\/strong> This will be the URL to redirect to after <strong>any<\/strong> of the actions have been completed successfully (Add, Update, or Delete).<\/p>\n<p>In any of the above cases, Use <strong>${FIELD}<\/strong> substitutions to insert submitted form values into the URL where FIELD is the field name.<\/p>\n<p><strong>Example of redirecting to a Retrieval, the process to redirect to other applications is the same:<\/strong><\/p>\n<p>Here is an example link to redirect to Retrieval I00200 passing the field MY_FIELD as parameter:<\/p>\n<p><strong>\u00a0 DDATA.I00200s?slnk=1&amp;MY_FIELD=${MY_FIELD}<\/strong><\/p>\n<p>Let&#39;s break down this link:<\/p>\n<p><strong>DDATA<\/strong> = Data Dictionary name<br \/>\n<strong>I00200s<\/strong> = Application name<br \/>\n<strong>slnk=1<\/strong> = This parameter tells your retrieval that this page is a SmartLink (link to:). This means that the page will only show records that equal the value(s) you pass to it. Without specifying slnk=1, the page assumes a greater than or equal to (GE) relationship.<br \/>\n<strong>MY_FIELD<\/strong> = The field name on the redirecting application.<br \/>\n<strong>${MY_FIELD}<\/strong> = The field name being passed from the maintainer to the redirecting application. The ${ } is Freemarker syntax for a variable, the field name inside the brackets will be replaced for the actual value of that field at run time.<\/p>\n<p>Here is the Application Properties for the Maintainer with the all_redir link setup:<\/p>\n<p><a href=\"https:\/\/www.mrc-productivity.com\/legacy\/images\/MaintainerRedir.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1053\" height=\"393\" class=\"alignnone  wp-image-5678\" alt=\"MaintainerRedir\" src=\"https:\/\/www.mrc-productivity.com\/legacy\/images\/MaintainerRedir.jpg\" srcset=\"https:\/\/www.mrc-productivity.com\/legacy\/images\/MaintainerRedir.jpg 1053w, https:\/\/www.mrc-productivity.com\/legacy\/images\/MaintainerRedir-150x55.jpg 150w, https:\/\/www.mrc-productivity.com\/legacy\/images\/MaintainerRedir-300x111.jpg 300w, https:\/\/www.mrc-productivity.com\/legacy\/images\/MaintainerRedir-900x335.jpg 900w\" sizes=\"auto, (max-width: 1053px) 100vw, 1053px\" \/><\/a><\/p>\n<p>Here is the Maintainer at run time right before clicking Accept:<\/p>\n<p><a href=\"https:\/\/www.mrc-productivity.com\/legacy\/images\/MaintainerRedir22.jpg\"><img decoding=\"async\" class=\"alignnone  wp-image-5678\" alt=\"MaintainerRedir\" src=\"https:\/\/www.mrc-productivity.com\/legacy\/images\/MaintainerRedir22.jpg\"  \/><\/a><\/p>\n<p>Here is the Retrieval at run time where I was redirected after clicking Accept on the Maintainer:<\/p>\n<p><a href=\"https:\/\/www.mrc-productivity.com\/legacy\/images\/MaintainerRedir33.jpg\"><img decoding=\"async\" class=\"alignnone  wp-image-5678\" alt=\"MaintainerRedir\" src=\"https:\/\/www.mrc-productivity.com\/legacy\/images\/MaintainerRedir33.jpg\"  \/><\/a><\/p>\n<p>Earlier, we included MY_FIELD=${MY_FIELD} in the Properties for the redirect in the Maintainer, but if you look closely at the URL in the Retrieval in the above image, you will see that the substitution inside the brackets has changed to MY_FIELD=A1010. As you see above, my maintainer redirect captured by Product Number entry from above and successfully passed it to my redirected application.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Redirecting from a Maintainer Occasionally you may want to redirect to another page after a user has performed an action within a Maintenance application (such as Update, Delete, or Add). One of the most common uses of the redirect is after a user fills out a form. Once they have completed and press the &quot;Accept&quot; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3567,"menu_order":5,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1152","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/1152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/comments?post=1152"}],"version-history":[{"count":11,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/1152\/revisions"}],"predecessor-version":[{"id":7114,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/1152\/revisions\/7114"}],"up":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/pages\/3567"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/legacy\/wp-json\/wp\/v2\/media?parent=1152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}