Changeset 1216 for EWD


Ignore:
Timestamp:
Aug 14, 2011, 10:02:59 PM (13 years ago)
Author:
Sam Habiel
Message:

Added VALKBANEWD1 as a wrapper around VALDIE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • EWD/r/KBANEWD1.m

    r1202 r1216  
    1 KBANEWD1 ; KBAN/SMH - Custom Tag Processor ; 6/8/11 4:01pm
     1KBANEWD1 ; KBAN/SMH - Custom Tag Processor ; 8/14/11 9:08pm
    22 ;;
    33SS(nodeOID,attrValues,docOID,technology) ; <fm:session /> to get VISTA Session Variables
     
    8080 N VAL S VAL=$$GET1^DIQ(DD,IENS,FIELDS)
    8181 D setSessionValue^%zewdAPI(fieldName,VAL,sessid)
    82  QUIT
     82 QUIT
     83 ;
     84 ; ---
     85 ;
     86VAL(sessid)
     87 D setSessionValue^%zewdAPI("tmp.error","Null Validation",sessid)
     88 D setSessionValue^%zewdAPI("tmp.name","testdiv",sessid) ; testdiv hardcoded for now.
     89 N KBANDD S KBANDD=+$TR($P(requestArray("name"),"DD",2),"_",".")  ; todo: check for 0 value
     90 N KBANF S KBANF=+$TR($P(requestArray("name"),"F",2),"_",".")     ; todo: check for 0 value
     91 N KBANIENS S KBANIENS=requestArray("iens")
     92 I $E(KBANIENS,$L(KBANIENS))'="," S KBANIENS=KBANIENS_","
     93 N KBANV S KBANV=requestArray("value")   ; todo: unescape urlencoding.
     94 N KBANRESULT ; Result
     95 N KBANMSG
     96 D VAL^DIE(KBANDD,KBANIENS,KBANF,"E",KBANV,.KBANRESULT,"","KBANMSG")
     97 I $D(KBANMSG) K ^ZZSAM M ^ZZSAM=KBANMSG
     98 ; KBANMSG(DIERR,1,TEXT,1) can be longer than one line (last subscript)... loop...
     99 ; HTML formatting for error message???
     100 I KBANRESULT="^" D setSessionValue^%zewdAPI("tmp.error",KBANMSG("DIERR",1,"TEXT",1),sessid)
     101 E  D
     102 . D setSessionValue^%zewdAPI("tmp.result","Success in Validating: "_$$SYMENC^MXMLUTL($$SYMENC^MXMLUTL(KBANRESULT(0))),sessid)
     103 . D setSessionValue^%zewdAPI("tmp.error","",sessid)
     104 QUIT ""
Note: See TracChangeset for help on using the changeset viewer.