User Tools

Site Tools


usage:functions

Dream Scrip has numerous in-build function to perform various tasks.
Usually starts with “#” (Ex: #date). Some excepts parameters and others don't

Function Parameters Description Example Function Group
#adcart
#age Caculate the age from a given date
#all
#app
#arandom
#arg
#assetpath
#bash
#box
#captcha
#cart
#char ASCII value
#chart
#chec
#command
#config
#consolidate set #consolidate=“true”
#count
#cper
#cr
#cur
#current
#currentform
#cyc
#cyear
#cyp
#date
#day (Date) int days=#days(xdatedel)-#days(xdate)
#db
#dec
#def
#df
#dir
#dream (dreamname.property)
#du du(zvalue)
#encode
#enh/#enhanced if #enhanced .eq. “true”
#err true
#evalx set xcustomfolders=xcustomfolders+“WEB-INF/custom/”+#eval(“folder[”+i+“]”)+“/”
#exceltocsv (filepath)
#exch (cur,date) set opord.xexch=#exch(opord.xcur)
#exist
#exists (filepath)
#extract
#field (fieldname.property) set #fields(xunitat→xstatusat.display)=“const”
#file (sql,filler,marker)
#file (path)
#filearray (“path,cont,ext”)
#fillsql
#fit (key,sep,sql)
#form
#format
#fper (date)
#fyear (date)
#get
#glall if #glall .ne. “”
#global
#gloffset int per=12+#sub(xdatecom,5,2)-#gloffset
#glper if #glper > 0 .and. per <> #glper .and. #in(#glset,per) < 0 .and. headerpage .ne. “glopen”
#glset console “index=”+#index(#glset,xper)
#glxset if #index(#glxset,comma) > 0
#glyear if #glyear > 0
#google
#hash
#he (HTML Encoder)
#hhmm
#htm
#http
#id set zid=#id
#index
#intersect
#inv
#ip
#irr
#job (desc,command,obj)
#json
#json (buffer, file filename)
#json (buffer, text)
#jsonar
#jsonob
#last
#le
#legacy (models)
#list (listname.property) set #list(reclist.caption) = #char(34)+“Allocated Receipt List”+#char(34)
#load set file=xfolderfrom+xfilefrom+“.dic”, set xtext=#load(file)
#loc (locale)
#log set #log=“false”
#login
#long/longtodate set xdatepay=#longtodate(pay)
#longtomac
#lower
#mactolong
#math
#max
#maxdate set xdateinv=#maxdate
#mess/messaging set #messaging=“false”
#model
#modul
#module
#month
#monthname
#monthshort
#mprofile
#nam
#nextrev (fieldname,size)
#nohtml
#now
#org set #org=zorg
#padl (str,length, pad) set smm=#padl(mm,2,“0”)
#padr
#parse (name,text,sep,reverse) int size=#parse(“folder”,custom,“,”)
#password (email,password) str msg=#pass(zemail,xpassword)
#path (email,password)
#pick (fieldname)
#proc/process set xdisplay=#process(xtext)
#profile (propname) select “xcus = '”+#profile(target)+“'”
#prop
#prop (str,propname) set xacc=#prop(xlocals.xprops,“placcount”)
#query (searchexp fieldlist)
#ran
#real
#regex (value,regex)
#regreplace (value,regex,str)
#rend
#replace (target,substring,newstring) set whloc.xloc=#replace(loc,“-”,“”)
#report
#reslist
#respath
#result
#ret
#rm
#roo
#round set xvalpost=#round(pogdtbat.xqty*rate,2)
#row
#save (file,text) set xtemp=#save(file,xtext)
#separator
#servlet xdoc attrib(link #servlet+“?page=”+page+“&nexttab=”+nexttab+“&command=Show&xempnum=?&xdoc=?”)
#session (user,pwd,id)
#sha1 (Str)
#show (object, param,…)
#singlecurrency
#site
#skin
#smsg
#soap (dest, file filename)
#split (name,text,width,sep) #split(name,text,width,sep)
#sql
#sqlfill (“select …”)
#sqllist (“”,“select …”) set s= #sqllist(“select xvoucher from glheader where zid=”+#id+“ and xyear=”+xyear+“ and xper=”+xper+“ and xstatusjv<>'Balanced' and (xapproved is null or xapproved <> '1')”)
#status (field, index) if xstatustor .eq. #status(“xstatustor”,2)
#sub (str, pos, length) set tmp = #sub(xdate,0,4)
#sysperiod
#system
#sysuser
#sysyear
#template (source,template,sep,placeholder)
#test
#text (textname)
#this (scheme/name/port)
#thumbnail
#time
#trim (arg)
#trn (type,trn)
#true
#unz
#upper (arg)
#url
#valid (date)
#verr
#vmsg
#wday (date)
#wiki (file file),
#wiki (text text)
#xml (buffer, file filename)
#xml (buffer, text)
#xmlattrfind (s,tag.attrib)
#xmlattrreplace (s,tag.attrib,r)
#xmltagfind (s,tag)
#xmltagreplace (s,tag,r)
#year
#zidfill
#zip (zipfile,ext,contains)
#zipent
/srv/www/htdocs/wiki/data/pages/usage/functions.txt · Last modified: 2015/01/19 03:25 by mueed