Difference between revisions of "Visimage FAQ"

From Vital Soft Wiki
Jump to: navigation, search
 
Line 35: Line 35:
 
*Maximum field name length is 20 characters.
 
*Maximum field name length is 20 characters.
 
*Warning: Do '''not''' create a global variable with the same name as the SD Indexed filename.
 
*Warning: Do '''not''' create a global variable with the same name as the SD Indexed filename.
 +
 +
===Date Formatting===
 +
:* '''!datint(date, ["format"])'''
 +
::* If no format is specified, "CYMD" will be used
 +
::* When converting dates, !datint now supports the formatting characters '-' and '/', if the specified format is one of CYMD, YMD, MDCY, MDY, DMCY and DMY.  For example:  "3/15/2016" and "9/9/2009" can be converted using the format "MDCY".
 +
 +
:* '''!datext(int-date, ["format"])'''
 +
::* Where "int-date" is any date in internal format (usually a call to !datint)
 +
::* If no format is specified, "CYMD" will be used
 +
<div id="DateFormats"></div>
 +
::* New date formats for displaying and converting dates:
 +
:::* The characters d (day), m (month) and y (year) have a special meaning according to the table shown below. 
 +
:::* All other characters are treated as insertion characters - see examples. 
 +
:::* When DDD, DDDD, MMM or MMMM appear in all caps, the corresponding name will also be all upper case. 
 +
:::: (Any other combination will display the day/month name using initial caps.  Case has no meaning for d, dd, m, mm, yy and yyyy.)
 +
 +
{| class="wikitable" style="margin-left: 80px;"
 +
| '''Format Chars''' || '''Meaning''' || ''' Output Length'''
 +
|-
 +
| d, dd || Day of month || One or two digits. (dd is always two).
 +
|-
 +
| ddd, dddd || Day name || Three chars (ddd) or full name (dddd).
 +
|-
 +
| m, mm || Month number || One or two digits. (mm is always two).
 +
|-
 +
| mmm, mmmm || Month name || Three chars (mmm) or full name (mmmm).
 +
|-
 +
| yy, yyyy || Year || Two digits (yy) or four (yyyy).
 +
|}
 +
 +
::*Examples:
 +
 +
{| class="wikitable" style="margin-left: 80px;"
 +
| '''Date Value''' || '''Format''' || ''' Result'''
 +
|-
 +
| 20160704 || "mm/dd/yyyy" || 07/04/2016
 +
|-
 +
| 20160704 || "dd-MMM" || 04-JUL
 +
|-
 +
| 20160704 || "d-m-yy" || 4-7-16
 +
|-
 +
| 20160714 || "ddd mmmm d, yyyy" || Thu July 14, 2016
 +
|-
 +
| 20160714 || "DDDD MMMM DD, YY" || THURSDAY JULY 14, 16
 +
|}
 +
 +
::*For CYMD dates, these formats can be used as print formats (Visimage & AskPlus) and with '''!format()'''

Latest revision as of 22:33, 6 June 2023

Visimage3 Frequently Asked Questions

Convert Error

Error #138 in list execution:
Convert Error - Invalid Digit:(X10 -> P20) OX5 2LD
reg:#add-own-zip exp:ADDRESS-INFO.ZIP
  • The error message contains useful information to help isolate the issue:
  • Visimage3 is trying to convert a character, length 10, value (X10) to a numeric (P20) value.
  • The value in the original X10 field is: OX5 2LD
  • The expression is: #add-own-zip = ADDRESS-INFO.ZIP
  • In this example, the convert error is being caused by a foreign zip-code.
  • Change the variable definition for ADD-OWN-ZIP from Numeric to Character, length 10.
Error #138 in list execution:
Convert Error - Invalid Digit:(X2 -> P20) TX
  • In this example, there is less information displayed. That indicates, that this error does not involve a variable compute statement.
  • Again we see that a Character value (X2) is being converted to a numeric (P20).
  • The value that cannot be converted to a number is: TX
  • This error was caused by attempting to total the MEMBER-FILE.STATE column.
  • Remove the Total option to clear the error.
Error #138 in selection:
Convert Error - Invalid Digit:(X2 -> I2) "JT"
  • In this example, Visimage3 is trying to convert an X2 value "JT" into an numeric (I2).
  • This error was caused by using an invalid selection criteria: ADDRESS-INFO.ACCOUNT = "JT".
(The user was intending to check the ASSOC-CODE, but selected the wrong field from the item list.)
  • Change ACCOUNT to ASSOC-CODE to clear the error.

Creating SD Indexed Files

  • Maximum filename length is 11 characters (for permanent files).
  • Maximum field name length is 20 characters.
  • Warning: Do not create a global variable with the same name as the SD Indexed filename.

Date Formatting

  • !datint(date, ["format"])
  • If no format is specified, "CYMD" will be used
  • When converting dates, !datint now supports the formatting characters '-' and '/', if the specified format is one of CYMD, YMD, MDCY, MDY, DMCY and DMY. For example: "3/15/2016" and "9/9/2009" can be converted using the format "MDCY".
  • !datext(int-date, ["format"])
  • Where "int-date" is any date in internal format (usually a call to !datint)
  • If no format is specified, "CYMD" will be used
  • New date formats for displaying and converting dates:
  • The characters d (day), m (month) and y (year) have a special meaning according to the table shown below.
  • All other characters are treated as insertion characters - see examples.
  • When DDD, DDDD, MMM or MMMM appear in all caps, the corresponding name will also be all upper case.
(Any other combination will display the day/month name using initial caps. Case has no meaning for d, dd, m, mm, yy and yyyy.)
Format Chars Meaning Output Length
d, dd Day of month One or two digits. (dd is always two).
ddd, dddd Day name Three chars (ddd) or full name (dddd).
m, mm Month number One or two digits. (mm is always two).
mmm, mmmm Month name Three chars (mmm) or full name (mmmm).
yy, yyyy Year Two digits (yy) or four (yyyy).
  • Examples:
Date Value Format Result
20160704 "mm/dd/yyyy" 07/04/2016
20160704 "dd-MMM" 04-JUL
20160704 "d-m-yy" 4-7-16
20160714 "ddd mmmm d, yyyy" Thu July 14, 2016
20160714 "DDDD MMMM DD, YY" THURSDAY JULY 14, 16
  • For CYMD dates, these formats can be used as print formats (Visimage & AskPlus) and with !format()