<?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: Ensure only numbers are used as input in 'Variable input' object in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Ensure-only-numbers-are-used-as-input-in-Variable-input-object/m-p/2430639#M96548</link>
    <description>&lt;P&gt;In QV there are options to enforce only certain values and especially the possibility to provide (calculated) value-lists from which the user could select the wanted value is very useful. I don't know if Sense has similar features.&lt;/P&gt;
&lt;P&gt;Beside this you could query the variable-value and reacting on it, maybe like:&lt;/P&gt;
&lt;P&gt;sum(Value) * $(=rangemin($(MyVar), 1))&lt;/P&gt;
&lt;P&gt;and/or:&lt;/P&gt;
&lt;P&gt;if(isnum($(MyVar)), 'MyVar = ' &amp;amp; $(MyVar), 'invalide value in MyVar')&lt;/P&gt;
&lt;P&gt;and showing it within a title or any text-box and/or using isnum($(MyVar)) as a calculation-condition.&lt;/P&gt;</description>
    <pubDate>Thu, 14 Mar 2024 07:51:22 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2024-03-14T07:51:22Z</dc:date>
    <item>
      <title>Ensure only numbers are used as input in 'Variable input' object</title>
      <link>https://community.qlik.com/t5/App-Development/Ensure-only-numbers-are-used-as-input-in-Variable-input-object/m-p/2430622#M96546</link>
      <description>&lt;P&gt;how can i ensure that only numbers are input and not text or any characters in 'Variable input'&lt;BR /&gt;If any text or char is used set the variable to 1.&lt;BR /&gt;How can we do this&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 07:02:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ensure-only-numbers-are-used-as-input-in-Variable-input-object/m-p/2430622#M96546</guid>
      <dc:creator>Kartik2</dc:creator>
      <dc:date>2024-03-14T07:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Ensure only numbers are used as input in 'Variable input' object</title>
      <link>https://community.qlik.com/t5/App-Development/Ensure-only-numbers-are-used-as-input-in-Variable-input-object/m-p/2430639#M96548</link>
      <description>&lt;P&gt;In QV there are options to enforce only certain values and especially the possibility to provide (calculated) value-lists from which the user could select the wanted value is very useful. I don't know if Sense has similar features.&lt;/P&gt;
&lt;P&gt;Beside this you could query the variable-value and reacting on it, maybe like:&lt;/P&gt;
&lt;P&gt;sum(Value) * $(=rangemin($(MyVar), 1))&lt;/P&gt;
&lt;P&gt;and/or:&lt;/P&gt;
&lt;P&gt;if(isnum($(MyVar)), 'MyVar = ' &amp;amp; $(MyVar), 'invalide value in MyVar')&lt;/P&gt;
&lt;P&gt;and showing it within a title or any text-box and/or using isnum($(MyVar)) as a calculation-condition.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 07:51:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ensure-only-numbers-are-used-as-input-in-Variable-input-object/m-p/2430639#M96548</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-03-14T07:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Ensure only numbers are used as input in 'Variable input' object</title>
      <link>https://community.qlik.com/t5/App-Development/Ensure-only-numbers-are-used-as-input-in-Variable-input-object/m-p/2430741#M96561</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28038"&gt;@marcus_sommer&lt;/a&gt;&amp;nbsp; , isnum() or istext() or isnull() shows error as I input nothing or any 'xyz' string in the input string.&lt;BR /&gt;I want to let the user input an exchange rate ,if the user puts nothing or zero or any string in that case i want the variable to be set to 1 ,so that wherever i have used that variable as a division i can see proper values.&lt;/P&gt;
&lt;DIV id="tinyMceEditor_58bd69a8de2abeKartik2_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 11:02:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ensure-only-numbers-are-used-as-input-in-Variable-input-object/m-p/2430741#M96561</guid>
      <dc:creator>Kartik2</dc:creator>
      <dc:date>2024-03-14T11:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Ensure only numbers are used as input in 'Variable input' object</title>
      <link>https://community.qlik.com/t5/App-Development/Ensure-only-numbers-are-used-as-input-in-Variable-input-object/m-p/2430753#M96564</link>
      <description>&lt;P&gt;Yes, of course if the content of a variable is a string then needs the variable-call be adjusted. In your case maybe like:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if(isnum(num#('$(MyVar)')) or&amp;nbsp;num#('$(MyVar)') = 0, 1,&amp;nbsp;num#('$(MyVar)'))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 11:35:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ensure-only-numbers-are-used-as-input-in-Variable-input-object/m-p/2430753#M96564</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-03-14T11:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Ensure only numbers are used as input in 'Variable input' object</title>
      <link>https://community.qlik.com/t5/App-Development/Ensure-only-numbers-are-used-as-input-in-Variable-input-object/m-p/2430765#M96566</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28038"&gt;@marcus_sommer&lt;/a&gt;&amp;nbsp;, I tweaked your solution to meet my needs ,this is the &lt;STRONG&gt;working&lt;/STRONG&gt; expression&lt;/P&gt;
&lt;P&gt;if(not isnum(num#('$(vEuroRate)')) or num#('$(vEuroRate)') = 0 or isnull(num#('$(vEuroRate)')), 1, num#('$(vEuroRate)'))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The first one is to handle any text in the input box ,second is to handle 0 and the third is to handle null&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 12:05:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ensure-only-numbers-are-used-as-input-in-Variable-input-object/m-p/2430765#M96566</guid>
      <dc:creator>Kartik2</dc:creator>
      <dc:date>2024-03-14T12:05:30Z</dc:date>
    </item>
  </channel>
</rss>

