Search these areas:
Support Forums
Product Info

-DataWeb: What's New
-Creating an Application
-The DataWeb Designer
-Application Management
-Data Tables
-Data Tables
-Data Analysis
-Object Model
-Full-Text Search
-Domain and Email Hosting
-HotBlock Modules
-Account Management
-New Responsive UI Module

DataWeb Help
Support Forums
Script Library
Knowledge Base

Home > Support

Support Forum

How do I fix a script that won't run due to incorrect data type
Josh_Fulleton asked:
DataWeb Script is automatically converting data types in a
   number of contexts. Numbers are automatically converted to
   strings whenever numbers are concatenated with strings. So I
   have converted the value to number datatype before putting it in

   Below is the old code which was causing issue:

    actHPPD = totalUnitShift *4/(maxStartOfDayUnitShift +
   totalCensusAdjustment + diffAdmitsDischarges/2)+maxBdgtHPPD +

   Updated code to fix that issue:

   We have decleared below variables:
   var numVal=0;
               var numVal1=0;
               var numVal2=0;
               var numVal3=0;
               var numVal4=0;
   numVal = new Number(totalUnitShift);
                   numVal1=((new Number(maxStartOfDayUnitShift) +
   new Number(totalCensusAdjustment) + new

                   numVal2=(new Number(maxBdgtHPPD));

                   numVal3=(new Number(maxBdgtIndHrs));

                   numVal4=(new Number(maxStartOfDayUnitShift) +
   new Number(totalCensusAdjustment) + new
                   actHPPD = new Number(numVal) * 4 / new
   Number(numVal1) + new Number(numVal2) + new Number(numVal3) /
   new Number(numVal4)
  Josh_Fulleton (DataWeb) responded:
  Dataweb considers this issue closed.
If you have additional questions or comments about this issue, please open it again.
If you have questions about a different topic please open a new support question.

Dataweb Support
  Please Log On
or create your own DataWeb Account.
Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
DataWeb, 720 North 10th Street, A #145, Renton, Washington 98057 *425-583-5970* Fax 484-770-4706* Email Us