Home Page link  

HTML Status Window Question

 

Point-Of-Sale Software - - MS Point Of Sale software discussed here

 Post an article  get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content  add this group's latest topics to your Google content  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
HTML Status Window Question Chris 08-21-2007
Posted by Chris on August 21, 2007, 3:32 pm
Please log in for more thread options
Hi Everyone. I searched the forum, but couldn't find any answers, sorry if
this is a very noob question:

We're using 1.3 1007 and RMSynergy. I've modified the html status window in
the pos to show the customer loyalty points. There are actually two values.
One is localpoints (the points accumulated at that store) and the other is
loyaltypoints. Both draw from the RMSynergy tables that get added during the
install.

I use those points to calculate a value the customer can redeem, but my
problem is I can't seem to test for NO value for points in those tables, so
my calculation bombs when it encounters an empty loyaltypoints or localpoints
field.

I've tried using the standard tests for null, or isnull, but those tests
fail, so even if the field is empty in those tables, it doesn't mean "null"
as far as I can tell.

What's in those fields when they are empty, and how can I test for empty? I
hope it isn't isempty...that's the only one I didn't try, but I didn't want
to keep casting about...

Also, is there some kind of guide or manual for all the ins and outs of
programming that status bar and the use of QSrules in these types of
situations?

Posted by Glenn Adams [MVP - Retail Mgmt on August 21, 2007, 4:57 pm
Please log in for more thread options
I'm sure that you are doing a SQL Select from Status.htm to get the
point values. You can use the SQL function IsNull() to make sure that
any null values in the row get a default value (0 would bake sense).
However,you may be getting no rows and the IsNull() is not going to fix
that. In that case you will probably need to modify your Select
statement to include a LEFT Join on something like Customer where you
know you will get a matching row.

Check out SQL Server Books on line at http://www.microsoft.com/sql to
get details on syntax.

select c.AccountNumber, isnull(x.localPoints, 0), isnull(y.loyaltyPoints, 0)
from Customer c
        Left Join localTable x on c.AccountNumber = x.SomeField
        Left Join loyaltyTable y on c.AccountNumber = y.SomeField
Where c.AccountNumber = {The selected customer's account number}

Obviously, I have no idea what tables or fields you need to use in the
join, but as long as there is a customer record, this query will return
a row and the fields will not be null...

Glenn Adams
Tiber Creek Consulting
http://www.tibercreek.com
glenn@tibercreek.com
----------------------------------------------
Please DO NOT respond to me directly but post all responses here in the
newsgroup so that all can share the information.


Chris wrote:
> Hi Everyone. I searched the forum, but couldn't find any answers, sorry if
> this is a very noob question:
>
> We're using 1.3 1007 and RMSynergy. I've modified the html status window in
> the pos to show the customer loyalty points. There are actually two values.
> One is localpoints (the points accumulated at that store) and the other is
> loyaltypoints. Both draw from the RMSynergy tables that get added during the
> install.
>
> I use those points to calculate a value the customer can redeem, but my
> problem is I can't seem to test for NO value for points in those tables, so
> my calculation bombs when it encounters an empty loyaltypoints or localpoints
> field.
>
> I've tried using the standard tests for null, or isnull, but those tests
> fail, so even if the field is empty in those tables, it doesn't mean "null"
> as far as I can tell.
>
> What's in those fields when they are empty, and how can I test for empty? I
> hope it isn't isempty...that's the only one I didn't try, but I didn't want
> to keep casting about...
>
> Also, is there some kind of guide or manual for all the ins and outs of
> programming that status bar and the use of QSrules in these types of
> situations?

Posted by Chris on August 23, 2007, 10:50 am
Please log in for more thread options
Oh, good point. There might not be a field to point to because the either
the local or global Synergy loyalty table might not be populated for the
matching Customer number.

So I should be able to test for eof -

Thanks Glenn,


"Glenn Adams [MVP - Retail Mgmt]" wrote:

> I'm sure that you are doing a SQL Select from Status.htm to get the
> point values. You can use the SQL function IsNull() to make sure that
> any null values in the row get a default value (0 would bake sense).
> However,you may be getting no rows and the IsNull() is not going to fix
> that. In that case you will probably need to modify your Select
> statement to include a LEFT Join on something like Customer where you
> know you will get a matching row.
>
> Check out SQL Server Books on line at http://www.microsoft.com/sql to
> get details on syntax.
>
> select c.AccountNumber, isnull(x.localPoints, 0), isnull(y.loyaltyPoints, 0)
> from Customer c
>         Left Join localTable x on c.AccountNumber = x.SomeField
>         Left Join loyaltyTable y on c.AccountNumber = y.SomeField
> Where c.AccountNumber = {The selected customer's account number}
>
> Obviously, I have no idea what tables or fields you need to use in the
> join, but as long as there is a customer record, this query will return
> a row and the fields will not be null...
>
> Glenn Adams
> Tiber Creek Consulting
> http://www.tibercreek.com
> glenn@tibercreek.com
> ----------------------------------------------
> Please DO NOT respond to me directly but post all responses here in the
> newsgroup so that all can share the information.
>
>
> Chris wrote:
> > Hi Everyone. I searched the forum, but couldn't find any answers, sorry if
> > this is a very noob question:
> >
> > We're using 1.3 1007 and RMSynergy. I've modified the html status window in
> > the pos to show the customer loyalty points. There are actually two values.

> > One is localpoints (the points accumulated at that store) and the other is
> > loyaltypoints. Both draw from the RMSynergy tables that get added during
the
> > install.
> >
> > I use those points to calculate a value the customer can redeem, but my
> > problem is I can't seem to test for NO value for points in those tables, so
> > my calculation bombs when it encounters an empty loyaltypoints or
localpoints
> > field.
> >
> > I've tried using the standard tests for null, or isnull, but those tests
> > fail, so even if the field is empty in those tables, it doesn't mean "null"
> > as far as I can tell.
> >
> > What's in those fields when they are empty, and how can I test for empty? I
> > hope it isn't isempty...that's the only one I didn't try, but I didn't want
> > to keep casting about...
> >
> > Also, is there some kind of guide or manual for all the ins and outs of
> > programming that status bar and the use of QSrules in these types of
> > situations?
>

Similar ThreadsPosted
HTML Status Window March 12, 2007, 9:36 am
Display SQL Results in HTML Window March 23, 2008, 2:14 pm
Custom button for Internal html window July 20, 2006, 2:03 am
HTML Status Bar December 1, 2005, 2:30 pm
HTML Status Bar on RMS POS December 9, 2005, 5:28 pm
HTML STATUS BAR September 25, 2006, 9:50 am
HTML Status Bar February 10, 2007, 4:20 pm
html status screen February 3, 2006, 7:30 am
html status screen February 3, 2006, 7:45 am
Add item using HTML Status Bar March 20, 2008, 5:25 pm

Contact Us | Privacy Policy
This site is not affiliated with Intuit - makers of Quickbooks and Quicken software
This site is not affiliated with Sage Software - makers of Peachtree accounting software
XML SitemapXML Sitemap