<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>SalesCart Forums : FGetVar?</title>
  <link>http://forum.salescart.com/forum/</link>
  <description><![CDATA[This is an XML content feed of; SalesCart Forums : SalesCart Standard / PRO / SQL : FGetVar?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 03:34:55 +0000</pubDate>
  <lastBuildDate>Thu, 27 Oct 2005 06:19:57 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 11.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.salescart.com/forum/RSS_post_feed.asp?TID=471</WebWizForums:feedURL>
  <image>
   <title><![CDATA[SalesCart Forums]]></title>
   <url>http://forum.salescart.com/forum/forum_images/web_wiz_forums.png</url>
   <link>http://forum.salescart.com/forum/</link>
  </image>
  <item>
   <title><![CDATA[FGetVar? : I think this is what you are interested...]]></title>
   <link>http://forum.salescart.com/forum/forum_posts.asp?TID=471&amp;PID=1687&amp;title=fgetvar#1687</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.salescart.com/forum/member_profile.asp?PF=6">lleemon</a><br /><strong>Subject:</strong> 471<br /><strong>Posted:</strong> October/27/05 at 6:19am<br /><br />I think this is what you are interested in.<br /><br /><br /><table width="99%"><tr><td><pre class="BBcode"><br /> '----------------------------------------------------------- ---------<br />' FGETVAR: Returns a varible from a Request object and initializes it if its empty<br />' Call FGetVar(variable name,default,type) type =s for string; n for number<br /> '----------------------------------------------------------- ---------<br />Public Function FGetVar(var,thedefault,thetype)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' Perform IDC style DefaultParameter processing.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If IsEmpty(Request(var)) Or Request(var) = "" or Request(var) = " " Then<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'The field is empty.  Handle the empty field condition<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If thetype = "s" Then<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MyVar  = (CStr(thedefault))<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Else<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MyVar  = thedefault<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End IF<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Else<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'The field is not empty.  Process the value<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'First handle error conditions<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If IsNumeric(Request(var)) = False and thetype = "n" Then<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.write ("Expecting a number instead of a string for: " & var)<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Response.end<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End If<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If thetype = "n" Then<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MyVar = ABS(Request(var))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Else<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MyVar = Request(var)<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'Replace single quote with two single quotes<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MyVar = Replace(MyVar,"'","''")<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End If<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End If<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'response.write (thedefault)<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FGetVar = My<br />End Function<br /></pre></td></tr></table>]]>
   </description>
   <pubDate>Thu, 27 Oct 2005 06:19:57 +0000</pubDate>
   <guid isPermaLink="true">http://forum.salescart.com/forum/forum_posts.asp?TID=471&amp;PID=1687&amp;title=fgetvar#1687</guid>
  </item> 
  <item>
   <title><![CDATA[FGetVar? : I noticed that when my Name field...]]></title>
   <link>http://forum.salescart.com/forum/forum_posts.asp?TID=471&amp;PID=1686&amp;title=fgetvar#1686</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.salescart.com/forum/member_profile.asp?PF=67">jimgub</a><br /><strong>Subject:</strong> 471<br /><strong>Posted:</strong> October/24/05 at 6:43am<br /><br />I noticed that when my Name field in the products db is set as MEMO I get "None" displayed in the shopping Cart "Description" field (i.e. VIEW Cart).. In trying to troubleshoot this, I noticed a variable/function in the code called FGetVar, which does some massaging of the data.  What is this? I couldn't find out what this does.. eitehr way, changing Name field to TEXT fixes problem...<br /><br />Thx<br />Jim<br />]]>
   </description>
   <pubDate>Mon, 24 Oct 2005 06:43:34 +0000</pubDate>
   <guid isPermaLink="true">http://forum.salescart.com/forum/forum_posts.asp?TID=471&amp;PID=1686&amp;title=fgetvar#1686</guid>
  </item> 
 </channel>
</rss>