<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: VBScript module with if else in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/VBScript-module-with-if-else/m-p/611516#M681155</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, i give you and example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reloadPrompt=MsgBox("Confirm report",4,"Confirm Generation")&lt;/P&gt;&lt;P&gt;if reloadPrompt = vbYes then&lt;/P&gt;&lt;P&gt;call LoadingVisible&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;another thing to do to controle the text that the user digit is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(len(variable) = 0) then&lt;/P&gt;&lt;P&gt;msgbox("PLEASE SET A TEXT")&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;exit sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fernando&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 07 Apr 2014 21:07:46 GMT</pubDate>
    <dc:creator>fkeuroglian</dc:creator>
    <dc:date>2014-04-07T21:07:46Z</dc:date>
    <item>
      <title>VBScript module with if else</title>
      <link>https://community.qlik.com/t5/QlikView/VBScript-module-with-if-else/m-p/611515#M681154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the below VBscript module that with a button inserts the values that the variables of input boxes are given by the user into an oracle table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub insert_oracle&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set myStoreval = ActiveDocument.Variables("STOREVAL")&lt;/P&gt;&lt;P&gt;insStore = myStoreval.GetContent.String&lt;/P&gt;&lt;P&gt;set myItemval = ActiveDocument.Variables("ITEMVAL")&lt;/P&gt;&lt;P&gt;insItem = myItemval.GetContent.String&lt;/P&gt;&lt;P&gt;set myPriceval = ActiveDocument.Variables("PRICEVAL")&lt;/P&gt;&lt;P&gt;insPrice = myPriceval.GetContent.String &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set dbinsval = CreateObject("ADODB.Connection")&lt;/P&gt;&lt;P&gt;dbinsval.open "DSN=xxx;UID=xxx;PWD=xxx"&lt;/P&gt;&lt;P&gt;set insertvalfile = dbinsval.execute("INSERT INTO QLIKVIEW (STORE, ITEMKEY, PRICEKEY) VALUES (' " &amp;amp; insStore &amp;amp; " ', ' " &amp;amp; insItem &amp;amp; " ', ' " &amp;amp; insPrice &amp;amp; " ') ;")&lt;/P&gt;&lt;P&gt;set insertvalfile = dbinsval.execute("COMMIT;")&lt;/P&gt;&lt;P&gt;dbinsval.Close&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;myStoreval.SetContent " ",true&lt;/P&gt;&lt;P&gt;myItemval.SetContent " ",true&lt;/P&gt;&lt;P&gt;myPriceval.SetContent " ",true&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i tell if the variables are empty send a message "You must fill all the input boxes" else if the user has fill all the input boxes send another message with option "You have to insert Values into the table Are you sure ?&amp;nbsp; Yes or No."&lt;/P&gt;&lt;P&gt;With No to exit from the Sub and with Yes to execute the insert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me to create this code ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 19:55:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VBScript-module-with-if-else/m-p/611515#M681154</guid>
      <dc:creator>geogou1973</dc:creator>
      <dc:date>2014-04-07T19:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript module with if else</title>
      <link>https://community.qlik.com/t5/QlikView/VBScript-module-with-if-else/m-p/611516#M681155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, i give you and example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reloadPrompt=MsgBox("Confirm report",4,"Confirm Generation")&lt;/P&gt;&lt;P&gt;if reloadPrompt = vbYes then&lt;/P&gt;&lt;P&gt;call LoadingVisible&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;another thing to do to controle the text that the user digit is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(len(variable) = 0) then&lt;/P&gt;&lt;P&gt;msgbox("PLEASE SET A TEXT")&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;exit sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fernando&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 21:07:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VBScript-module-with-if-else/m-p/611516#M681155</guid>
      <dc:creator>fkeuroglian</dc:creator>
      <dc:date>2014-04-07T21:07:46Z</dc:date>
    </item>
  </channel>
</rss>

