{"id":25739,"date":"2019-09-02T11:27:21","date_gmt":"2019-09-02T09:27:21","guid":{"rendered":"http:\/\/help.qualiware.it\/qw-help\/?p=25739"},"modified":"2019-09-02T11:29:18","modified_gmt":"2019-09-02T09:29:18","slug":"assegnazione-di-una-fase-ai-responsabili-dellente-e-di-tutti-quelli-superiori","status":"publish","type":"post","link":"https:\/\/help.qualiware.it\/qw-help\/assegnazione-di-una-fase-ai-responsabili-dellente-e-di-tutti-quelli-superiori\/","title":{"rendered":"Assegnazione di una fase ai responsabili dell&#8217;ente e di tutti quelli superiori"},"content":{"rendered":"<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">' Il seguente frammento, assegnato post attivit\u00e0, assegna alla attivit\u00e0 nr. 2 i redattori della attivit\u00e0 1 e i responsabili dell\u2019ente in CUSTOM3, nonch\u00e9 di tutti gli enti da cui questi dipendono\r\n\r\ndim tipo, tipo_cont, numero as string\r\ndim ind_rev as integer\r\n\r\nUnPackCode(\"DW\",CODDOC,tipo,tipo_cont,numero,ind_rev)\r\ndim codam = New DBArray\r\ncodam = BPMWorkflowGetPersons(DB,tipo,tipo_cont,numero,ind_rev,ACTIVITY)\r\n\r\nif formfields(\"CUSTOM3\").value &lt;&gt; \"\"\r\n\r\n                Dim par As AssocArray = New AssocArray\r\n                par(\"COD\")=left(formfields(\"CUSTOM3\").value,formfields(\"CUSTOM3\").value.indexof(\" - \"))\r\n                dim msg, sql as string\r\n                dim q1 as qwtable\r\n                sql = \" with entiCTE AS \"\r\n                sql += \"(SELECT codice, ente_dip from enti where codice=:COD \"\r\n                sql += \" UNION ALL select e.codice, e.ente_dip from enti e join entiCTE ec on ec.ente_dip=e.codice) \"\r\n                sql += \" select codice as resp from person where (ente in (select codice from entiCTE) and resp=1) \"\r\n                sql += \" or (ente2 in (select codice from entiCTE) and resp2=1) \"\r\n                sql += \" or (ente3 in (select codice from entiCTE) and resp3=1) \"\r\n                sql += \" or (ente4 in (select codice from entiCTE) and resp4=1) \"\r\n                sql += \" or (ente5 in (select codice from entiCTE) and resp5=1) \"\r\n                q1=OpenTable(DB,sql,par,false,false,msg)\r\n\r\n                if empty(msg) then\r\n                               if q1.rowset.first()\r\n                                 do while not q1.rowset.endofset()\r\n                                   codam.add(q1.rowset.fields(\"RESP\").value)\r\n                                               q1.rowset.next()\r\n                                 loop\r\n                               end if\r\n                end if\r\n                CloseTable(q1)\r\nend if\r\n\r\ndim esito as String\r\nesito=BPMWorkflowAddPersons(DB,tipo,tipo_cont,numero,ind_rev,2,codam,0)\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&#8216; Il seguente frammento, assegnato post attivit\u00e0, assegna alla attivit\u00e0 nr. 2 i redattori della attivit\u00e0 1 e i responsabili dell\u2019ente in CUSTOM3, nonch\u00e9 di tutti gli enti da cui questi dipendono dim tipo, tipo_cont, numero as string dim ind_rev as integer UnPackCode(&#8220;DW&#8221;,CODDOC,tipo,tipo_cont,numero,ind_rev) dim codam = New DBArray codam = BPMWorkflowGetPersons(DB,tipo,tipo_cont,numero,ind_rev,ACTIVITY) if formfields(&#8220;CUSTOM3&#8221;).value &lt;&gt; &#8220;&#8221;&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"ngg_post_thumbnail":0,"footnotes":""},"categories":[65],"tags":[69],"acf":[],"_links":{"self":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/25739"}],"collection":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/comments?post=25739"}],"version-history":[{"count":0,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/25739\/revisions"}],"wp:attachment":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/media?parent=25739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/categories?post=25739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/tags?post=25739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}