{"id":27972,"date":"2022-02-01T12:55:31","date_gmt":"2022-02-01T11:55:31","guid":{"rendered":"https:\/\/help.qualiware.it\/qw-help\/?p=27972"},"modified":"2022-02-01T12:55:31","modified_gmt":"2022-02-01T11:55:31","slug":"esecuzione-valutazione-fornitori-da-task","status":"publish","type":"post","link":"https:\/\/help.qualiware.it\/qw-help\/esecuzione-valutazione-fornitori-da-task\/","title":{"rendered":"Esecuzione valutazione fornitori da task"},"content":{"rendered":"<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"csharp\">' Il seguente snippet mostra come sia possibile eseguire la valutazione fornitori da task \r\n' N.B. \u00e8 utilizzabile solo sulla versione 2021.07+ o successiva\r\n\r\ndim state as new valforform.valforstate()\r\nstate.dmd_ref=new ValforDataModule(DB)\r\n\r\nDB.QWSession.DESCRITT.rowset.refresh()\r\n\r\nstate.dmd_ref.VALFOR.beginappend()\r\nstate.dmd_ref.VALFOR.replace(\"NUMVAL\",ltrim(str(DB.QWSession.DESCRITT.rowset.fields(\"ANNO\").value))+right(\"    \"+ltrim(str(DB.QWSession.DESCRITT.rowset.fields(\"NUMVALFOR\").value)),4))\r\nstate.dmd_ref.VALFOR.replace(\"APPL\",1)\r\nstate.dmd_ref.VALFOR.replace(\"DATA\",Today())\r\nstate.dmd_ref.VALFOR.replace(\"CODRED\",\"AM1\")\r\nstate.dmd_ref.VALFOR.replace(\"DATA_INF\",ctod(\"01\/01\/2021\"))\r\nstate.dmd_ref.VALFOR.replace(\"DATA_SUP\",ctod(\"31\/12\/2021\"))\r\n\t\r\ndim msg as string=\"\"\r\nif state.dmd_ref.VALFOR.saverecord(msg)\r\n\tDB.QWSession.DESCRITT.replace(\"NUMVALFOR\",DB.QWSession.DESCRITT.rowset.fields(\"NUMVALFOR\").value+1)\r\n\tDB.QWSession.DESCRITT.saverecord()\r\n   \r\n   valforform.Valutazione_Fornitori(DB.QWSession,state) ' Esegue la valutazione\r\n   if state.error=\"\"\r\n      state.dmd_ref.VALFOR.replace(\"CALC_ESEG\",true)\r\n\t  state.dmd_ref.VALFOR.replace(\"CODAPPR\",\"AM1\")\r\n\t  state.dmd_ref.VALFOR.saverecord()\r\n\t\t\t\r\n\t  valforform.Assegna_Qualificazione_Fornitori(DB.QWSession,state) ' Assegna le classi ai fornitori\r\n   else\r\n\t  throw new exception(state.error)\r\n   end If\r\nElse\r\n   throw new exception(msg)\r\nEnd If\r\n\t\r\nstate.dmd_ref.dispose()\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&#8216; Il seguente snippet mostra come sia possibile eseguire la valutazione fornitori da task &#8216; N.B. \u00e8 utilizzabile solo sulla versione 2021.07+ o successiva dim state as new valforform.valforstate() state.dmd_ref=new ValforDataModule(DB) DB.QWSession.DESCRITT.rowset.refresh() state.dmd_ref.VALFOR.beginappend() state.dmd_ref.VALFOR.replace(&#8220;NUMVAL&#8221;,ltrim(str(DB.QWSession.DESCRITT.rowset.fields(&#8220;ANNO&#8221;).value))+right(&#8221; &#8220;+ltrim(str(DB.QWSession.DESCRITT.rowset.fields(&#8220;NUMVALFOR&#8221;).value)),4)) state.dmd_ref.VALFOR.replace(&#8220;APPL&#8221;,1) state.dmd_ref.VALFOR.replace(&#8220;DATA&#8221;,Today()) state.dmd_ref.VALFOR.replace(&#8220;CODRED&#8221;,&#8221;AM1&#8243;) state.dmd_ref.VALFOR.replace(&#8220;DATA_INF&#8221;,ctod(&#8220;01\/01\/2021&#8221;)) state.dmd_ref.VALFOR.replace(&#8220;DATA_SUP&#8221;,ctod(&#8220;31\/12\/2021&#8243;)) dim msg as string=&#8221;&#8221; if state.dmd_ref.VALFOR.saverecord(msg) DB.QWSession.DESCRITT.replace(&#8220;NUMVALFOR&#8221;,DB.QWSession.DESCRITT.rowset.fields(&#8220;NUMVALFOR&#8221;).value+1) DB.QWSession.DESCRITT.saverecord() valforform.Valutazione_Fornitori(DB.QWSession,state) &#8216; Esegue la valutazione if state.error=&#8221;&#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":[82],"acf":[],"_links":{"self":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/27972"}],"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=27972"}],"version-history":[{"count":0,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/posts\/27972\/revisions"}],"wp:attachment":[{"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/media?parent=27972"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/categories?post=27972"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/help.qualiware.it\/qw-help\/wp-json\/wp\/v2\/tags?post=27972"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}