%define DTW_SET_TOTAL_ROWS="YES" %message{ default: {alert("$(DTW_DEFAULT_MESSAGE)")%} : continue %} %function(DTW_SQL) query() { select * from rdptldb.xpn100p where upper(lastname) like '$(name)%' %report{ %row{ ar("$(V1)","$(V2)","$(V3)","$(V4)","$(V5)","$(V6)"); %} %if ($(TOTAL_ROWS) > "0") tb.show(); tb.selectRow(tb.rows[0]); %endif %} %} %html(list) { @DTW_SUBSTR($(last), "1", "16", name) @DTW_STRIP($(name), name) @DTW_ASSIGN(name, @DTW_rUPPERCASE($(name))) %if (@DTW_rLENGTH(name) < "3") wtnmsg("Please [enter] a minimum of 3 characters","",false) %else @query() @DTW_CONCAT($(TOTAL_ROWS), " results found", msg) wtnmsg("$(msg)","",false) %endif %}