var customElementID = 0; var lastUpdate = ''; var cacheName = ''; var retArray = ''; // keep this as an empty string // get ID of CE if( NOT StructKeyExists( request.site.AvailControlsByName, 'custom:#arguments.customElementName#' ) ) { Throw( 'CustomElementName argument is not valid. Must call getCachedCEData() with a valid custom element name (#arguments.CustomElementName#).' ); } // get Custom element ID customElementID = request.site.AvailControlsByName['custom:#arguments.customElementName#'].ID; // construct cache name cacheName = Replace( '#customElementID#^#customElementFieldName#^#item#', " ", "_", "ALL" ); // build memory structures if they don't exist if( NOT StructKeyExists( application, arguments.memName ) ) application[arguments.memname] = StructNew(); if( NOT StructKeyExists( application[arguments.memname], 'getCachedCEData' ) ) application[arguments.memname].getCachedCEData = StructNew(); if( NOT StructKeyExists( application[arguments.memname].getCachedCEData, cacheName ) ) { application[arguments.memname].getCachedCEData[cacheName] = StructNew(); application[arguments.memname].getCachedCEData[cacheName].lastUpdated = DateAdd( 'm', -36, now() ); application[arguments.memname].getCachedCEData[cacheName].cache = ''; } // check if custom element has been updated since cache last made lastUpdate = getElementTypeLastUpdate(customElementID); // check if cache is good if( DateCompare( application[arguments.memname].getCachedCEData[cacheName].lastUpdated, lastUpdate ) eq 1 ) { if( isArray( application[arguments.memname].getCachedCEData[cacheName].cache ) ) { // Cache is GOOD! retArray = application[arguments.memname].getCachedCEData[cacheName].cache; } } if( NOT isArray( retArray ) ) { // cache is NO good, rebuild it. retArray = application.ADF.ceData.getCEData( arguments.customElementName, arguments.customElementFieldName, arguments.item ); application[arguments.memname].getCachedCEData[cacheName].lastUpdated = now(); application[arguments.memname].getCachedCEData[cacheName].cache = retArray; } var retDate = request.site.availControls[arguments.elementTypeID].LastUpdateSinceRestart; if( NOT isDate( retDate ) ) { if( retDate eq '' ) retDate = DateAdd( 'yyyy', -10, now() ); // back it way back (10 years ago) else retDate = now(); } var assocArray = StructNew(); var ceDataArray = ''; var arrLen = 0; var indexValue = ''; var fldsList = ''; var fldsListLen = 0; var fld = ''; var i = 0; var j = 0; var lastUpdateForElement = ''; var lastUpdateForCache = ''; var lock_name = 'BuildCEAssociativeArray_#arguments.customelement#_#arguments.index#'; var customElementID = request.site.AvailControlsByName['custom:#arguments.customElement#'].ID; var key = arguments.index & '^' & arguments.filterFieldName & '^' & arguments.filterValue; var bAdd = 0; var dateComp = 0; // build the memory cache structures if they don't already exist if( NOT StructKeyExists( application, arguments.memName ) ) application[arguments.memname] = StructNew(); if( NOT StructKeyExists( application[arguments.memname], 'BuildCEAssociativeArray' ) ) application[arguments.memname].BuildCEAssociativeArray = StructNew(); if( NOT StructKeyExists( application[arguments.memname].BuildCEAssociativeArray, arguments.customelement ) ) application[arguments.memname].BuildCEAssociativeArray[#arguments.customelement#] = StructNew(); if( StructKeyExists( application[arguments.memname].BuildCEAssociativeArray[arguments.customelement], key ) ) { // check to see if element has been updated since memory cache last build lastUpdateForElement = getElementTypeLastUpdate(customElementID); lastUpdateForCache = application[arguments.memname].BuildCEAssociativeArray[arguments.customelement][key].lastUpdated; if( isDate(lastUpdateForElement) AND isDate(lastUpdateForCache) ) dateComp = DateCompare( lastUpdateForElement, lastUpdateForCache ); else dateComp = 0; // get read lock lock name="#lock_name#" type="read" timeout="20" { if( dateComp eq -1 AND isStruct(application[arguments.memname].BuildCEAssociativeArray[arguments.customelement][key].cache) ) { // WriteOutput('
USING CACHE #GetTickCount()-start#'); // cache is GOOD, return it return application[arguments.memname].BuildCEAssociativeArray[arguments.customelement][key].cache; } else { // cache is NOT good, delete cache for this entire element, and continue on. StructDelete( application[arguments.memname].BuildCEAssociativeArray, arguments.customelement ); application[arguments.memname].BuildCEAssociativeArray[arguments.customelement] = structNew(); } } } application[arguments.memname].BuildCEAssociativeArray[arguments.customelement][key] = StructNew(); application[arguments.memname].BuildCEAssociativeArray[arguments.customelement][key].lastUpdated = ''; application[arguments.memname].BuildCEAssociativeArray[arguments.customelement][key].cache = '';
ceDataArray = getCachedCEData(arguments.memName, arguments.customElement, arguments.filterFieldName, arguments.filterValue); arrLen = ArrayLen(ceDataArray); for( i=1; i lte arrLen; i = i + 1 ) { // get value that will be the key - special case for PageID if( arguments.index eq 'pageid' ) indexValue = ceDataArray[i].pageID; else indexValue = ceDataArray[i].Values[arguments.index]; if( NOT StructKeyExists( assocArray, indexValue ) ) assocArray[indexValue] = StructNew(); // store all fields in struct fldsList = StructKeyList(ceDataArray[i].Values, '^'); fldsListLen = ListLen(fldsList, '^'); for( j=1; j lte fldsListLen; j = j + 1 ) { fld = ListGetAt(fldsList,j, '^'); if( StructKeyExists( ceDataArray[i].Values, fld ) ) assocArray[indexValue][fld] = ceDataArray[i].Values[fld]; // else // assocArray[indexValue][fld] = ''; } assocArray[indexValue]['PageID'] = ceDataArray[i].pageID; } application[arguments.memname].BuildCEAssociativeArray[arguments.customelement][key].lastUpdated = now(); application[arguments.memname].BuildCEAssociativeArray[arguments.customelement][key].cache = assocArray;
var lastUpdateForElement = ''; var lastUpdateForCache = ''; var lock_name = 'BuildCEView_#arguments.customelement#_#arguments.orderBy#'; var customElementID = request.site.AvailControlsByName['custom:#arguments.customElement#'].ID; var apprState = Replace( arguments.approvalStateList, ' ', '', 'ALL'); var key = arguments.orderBy & '^' & apprState; var start = GetTickCount(); // build the memory cache structures if they don't already exist if( NOT StructKeyExists( application, arguments.memName ) ) application[arguments.memname] = StructNew(); if( NOT StructKeyExists( application[arguments.memname], 'BuildCEView' ) ) application[arguments.memname].BuildCEView = StructNew(); if( NOT StructKeyExists( application[arguments.memname].BuildCEView, arguments.customelement ) ) application[arguments.memname].BuildCEView[#arguments.customelement#] = StructNew(); if( StructKeyExists( application[arguments.memname].BuildCEView[arguments.customelement], key ) ) { // check to see if element has been updated since memory cache last build lastUpdateForElement = getElementTypeLastUpdate(customElementID); lastUpdateForCache = application[arguments.memname].BuildCEView[arguments.customelement][key].lastUpdated; if( isDate(lastUpdateForElement) AND isDate(lastUpdateForCache) ) dateComp = DateCompare( lastUpdateForElement, lastUpdateForCache ); else dateComp = 0; // get read lock lock name="#lock_name#" type="read" timeout="20" { if( dateComp eq -1 ) { // cache is GOOD, return it return application[arguments.memname].BuildCEView[arguments.customelement][key].cache; } else { // cache is NOT good, delete cache for this entire element, and continue on. StructDelete( application[arguments.memname].BuildCEView, arguments.customelement ); application[arguments.memname].BuildCEView[arguments.customelement] = structNew(); } } } application[arguments.memname].BuildCEView[arguments.customelement][key] = StructNew(); application[arguments.memname].BuildCEView[arguments.customelement][key].lastUpdated = ''; application[arguments.memname].BuildCEView[arguments.customelement][key].cache = ''; sql = "select * from view" & arguments.customelement; orderClause = ''; if(arguments.orderBy is not "") orderClause &= " order by " & arguments.orderBy; #sql# where Approval_State in () #orderClause# application[arguments.memname].BuildCEView[arguments.customelement][key].cache = view; application[arguments.memname].BuildCEView[arguments.customelement][key].lastUpdated = now(); var assocArray = StructNew(); var ceDataArray = ''; var indexValue = ''; var keyValue = ''; var IDValue = ''; var i = 0; var lastUpdate = ''; var lock_name = 'BuildValueListAssociativeArray_#arguments.customelement#_#arguments.keyfield#_#arguments.IDfield#'; var combo_name = '#arguments.keyfield#^#arguments.IDfield#^#arguments.ApprovalStateList#'; var customElementID = request.site.AvailControlsByName['custom:#arguments.customElement#'].ID; var apprState = Replace( arguments.approvalStateList, ' ', '', 'ALL'); var bAdd = 0; // build the memory cache structures if they don't already exist if( NOT StructKeyExists( application, arguments.memName ) ) application[arguments.memname] = StructNew(); if( NOT StructKeyExists( application[arguments.memname], 'BuildValueListAssociativeArray' ) ) application[arguments.memname].BuildValueListAssociativeArray = StructNew(); if( NOT StructKeyExists( application[arguments.memname].BuildValueListAssociativeArray, arguments.customelement ) ) application[arguments.memname].BuildValueListAssociativeArray[#arguments.customelement#] = StructNew(); if( StructKeyExists( application[arguments.memname].BuildValueListAssociativeArray[arguments.customelement], combo_name ) ) { // check to see if element has been updated since memory cache last build, if so need to rebuild lastUpdate = getElementTypeLastUpdate(customElementID); cacheDate = application[arguments.memname].BuildValueListAssociativeArray[arguments.customelement][combo_name].lastUpdated; if( isDate(cacheDate) ) dateComp = DateCompare( lastUpdate, cacheDate ); else dateComp = 0; // force rebuild // get read lock lock name="#lock_name#" type="read" timeout="20" { if( dateComp eq -1 ) { // cache is GOOD, return it // WriteOutput('
USING CACHE #GetTickCount()-start#'); return application[arguments.memname].BuildValueListAssociativeArray[arguments.customelement][combo_name].cache; } else { // cache is NOT good, delete cache for this entire element, and continue on. StructDelete( application[arguments.memname].BuildValueListAssociativeArray, arguments.customelement ); application[arguments.memname].BuildValueListAssociativeArray[arguments.customelement] = structNew(); } } } application[arguments.memname].BuildValueListAssociativeArray[arguments.customelement][combo_name] = StructNew(); application[arguments.memname].BuildValueListAssociativeArray[arguments.customelement][combo_name].lastUpdated = ''; application[arguments.memname].BuildValueListAssociativeArray[arguments.customelement][combo_name].cache = '';
ceDataArray = getCachedCEData(arguments.customElement); for( i=1; i lte ArrayLen(ceDataArray); i = i + 1 ) { if( arguments.ApprovalStateList eq '' ) bAdd = 1; else { if( NOT StructKeyExists(ceDataArray[i].Values,'Approval_State' ) ) bAdd = 1; else { if( FindNoCase( ceDataArray[i].Values.Approval_State, apprState ) ) bAdd = 1; else bAdd = 0; } } if( bAdd ) { keyValue = ceDataArray[i].Values[arguments.keyField]; if( arguments.IDField eq 'PageID' ) IDValue = ceDataArray[i].PageID; else IDValue = ceDataArray[i].Values[arguments.IDField]; if( NOT StructKeyExists( assocArray, keyValue ) ) { assocArray[keyValue] = StructNew(); assocArray[keyValue].IDList = IDValue; } else { if( StructKeyExists( assocArray, keyValue ) ) assocArray[keyValue].IDList = ListAppend( assocArray[keyValue].IDList, IDValue ); } } } application[arguments.memname].BuildValueListAssociativeArray[arguments.customelement][combo_name].lastUpdated = now(); application[arguments.memname].BuildValueListAssociativeArray[arguments.customelement][combo_name].cache = assocArray;
var retAssocArray = StructNew(); var indexValue = ''; var xAssocArray = BuildCEAssociativeArray( arguments.memName, arguments.ce, arguments.indexColumn, arguments.filterFieldName, arguments.filterValue ); var xList = StructKeyList(xAssocArray); var xListLen = ListLen(xList); var i = 0; var xID = ''; var currentTitle = ''; var parenttitle = ''; var key = ''; var sortValue = ''; var tmp = ''; // loop over list for( i=1; i lte xListLen; i = i + 1 ) { xID = ListGetAt(xList, i); // get current title currentTitle = xAssocArray[xID][arguments.TitleColumn]; if( Len(arguments.sortColumn) ) { sortValue = xAssocArray[xID][arguments.sortColumn]; if( len(sortValue) eq 0 ) sortValue = 999; sortValue = sortValue & '-#currentTitle#'; } else sortValue = currentTitle; key = xID; // Create node for current if( NOT StructKeyExists( retAssocArray, key ) ) { retAssocArray[key] = StructNew(); // retAssocArray[key].children = StructNew(); retAssocArray[key].children = ArrayNew(1); } retAssocArray[key].parent = xAssocArray[xID][arguments.ParentColumn]; retAssocArray[key].title = currentTitle; retAssocArray[key].sortValue = sortValue; retAssocArray[key].id = xID; // get value for Parent items if( xAssocArray[xID][arguments.parentColumn] eq '' ) xAssocArray[xID][arguments.parentColumn] = 0; if( xAssocArray[xID][arguments.parentColumn] neq 0 ) parentTitle = xAssocArray[xAssocArray[xID][arguments.parentColumn]][arguments.titleColumn]; else parentTitle = '_root_'; parentkey = xAssocArray[xID][arguments.parentColumn]; // Create Node for Parent items if( NOT StructKeyExists( retAssocArray, parentkey ) ) { retAssocArray[parentkey] = StructNew(); // retAssocArray[parentkey].children = StructNew(); retAssocArray[parentkey].children = ArrayNew(1); retAssocArray[parentkey].title = parentTitle; } // create Child node in Parent // if( NOT StructKeyExists(retAssocArray[parentkey].children, key ) ) // { tmp = StructNew(); tmp.index = i; tmp.parent = parentKey; tmp.sortValue = sortValue; tmp.id = xID; // retAssocArray[parentkey].children[key] = StructNew(); // retAssocArray[parentkey].children[key].index = i; // retAssocArray[parentkey].children[key].parent = parentKey; ArrayAppend( retAssocArray[parentkey].children, tmp ); retAssocArray[parentkey].children = application.adf.data.arrayOfStructsSort( retAssocArray[parentkey].children, 'sortValue', 'asc', 'textnocase' ); // } } // Get all photos at once and build associative array for fast lookup var photoIDList = ''; var dataArray = ArrayNew(1); var photoArray = StructNew(); var i = 0; var guid = ''; for( i=1; i lte ArrayLen(arguments.items); i = i + 1 ) { if( StructKeyExists(items[i].values, arguments.field) AND items[i].values[arguments.field] neq '' ) photoIDList = ListAppend( photoIDList, items[i].values[arguments.field] ); } if( photoIDList neq '' ) { dataArray = application.ptPhotoGallery.photoDAO.getPhotoData(photoID="#photoIDList#"); for( i=1; i lte ArrayLen(dataArray); i = i + 1 ) { guid = dataArray[i].values.photoID; photoArray[guid] = dataArray[i].values[arguments.field]; } } var varname = 'DATASHEET_#ReplaceNoCase(arguments.customElementName, ' ', '_', 'ALL')#'; var id = request.datasheet.currentColumnValue; var display = ''; if( NOT StructKeyExists( request, varname ) ) { request[varname] = StructNew(); request[varname].ceAssocArray = BuildCEAssociativeArray(arguments.customElementName, arguments.IDField); if( arguments.DisplayEditIcon ) request[varname].dataPageIDArray = BuildDataPageIDArray(arguments.customElementName, arguments.IDField); } if( StructKeyExists( request[varname].ceAssocArray, id ) ) { if( arguments.DisplayEditIcon eq 1 AND StructKeyExists(request[varname].dataPageIDArray, id) ) { show = "$(this).find('span').show();"; hide = "$(this).find('span').hide();"; formID = request.site.availControlsByName['custom:#arguments.CustomElementName#'].ID; editPageID = request[varname].dataPageIDArray[id]; addEditLink = "#application.ADF.ajaxProxy#?bean=forms_1_1&method=renderAddEditForm&formid=#formID#&dataPageId=#editPageID#&lbAction=refreshparent&title=Edit"; display = '
' & request[varname].ceAssocArray[id][arguments.DisplayField] & ' 
'; } else display = request[varname].ceAssocArray[id][arguments.DisplayField]; } else display = "?? [#id#]";
#application.ADF.scripts.loadADFLightbox()# #Display# request.datasheet.currentSortValue = display; request.datasheet.currentFormattedValue = tdHTML;
var formID = request.site.availControlsByName['custom:#arguments.CustomElementName#'].ID; var fieldID = GetFieldID(arguments.customElementName, arguments.IDField ); var retStruct = StructNew(); select pageID, FieldValue from data_fieldValue where FormID = AND fieldID = AND VersionState = 2 retStruct[qry.fieldvalue] = qry.pageID; var i = 0; var indexes = ''; var j= 0; var key = ''; // Rebuild Associative Array Memory Cache (if it already exists) // these memory caches are used to house main table data for( i=1; i lte ListLen(arguments.namelist); i=i+1 ) { ce = ListGetAt(arguments.namelist, i); if( StructKeyExists( application, arguments.memName) AND StructKeyExists( application[arguments.memname],'BuildCEAssociativeArray') AND StructKeyExists( application[arguments.memname].BuildCEAssociativeArray, ce) ) { // get list of indexes indexes = StructKeyList(application[arguments.memname].BuildCEAssociativeArray[ce]); for( j=1; j lte ListLen(indexes); j=j+1 ) { index = ListGetAt(indexes,j); key = ListFirst( index, '^' ); if( ListLen(index, '^') gt 1 ) ApprovalStateList = ListLast(index, '^'); else ApprovalStateList = ''; if( arguments.logFile neq '' ) application.ADF.utils.logAppend(msg='...BuildCEAssociativeArray(#ce#,#key#,#ApprovalStateList#)',logFile='#arguments.logFile#'); BuildCEAssociativeArray( ce, key, ApprovalStateList ); } } } var i = 0; var j = 0; var ce = ''; var indexes = ''; var index = ''; var keyField = ''; var IDField = ''; var theListLen = ListLen(arguments.buildValueList); var ApprovalStateList = ''; for( i=1; i lte theListLen; i=i+1 ) { ce = ListGetAt(arguments.buildValueList, i); if( StructKeyExists(application, arguments.memName) AND StructKeyExists(application[arguments.memname],'BuildValueListAssociativeArray') AND StructKeyExists(application[arguments.memname].BuildValueListAssociativeArray, ce) ) { // get list of indexes indexes = StructKeyList(application[arguments.memname].BuildValueListAssociativeArray[ce]); for( j=1; j lte ListLen(indexes); j=j+1 ) { index = ListGetAt(indexes,j); keyField = ListFirst( index, '^' ); IDField = ListGetAt( index, 2, '^' ); ApprovalStateList = ''; if( ListLen(index) gt 2 ) ApprovalStateList = ListGetAt( index, 3, '^' ); if( arguments.logfile neq '' ) application.ADF.utils.logAppend(msg='...BuildValueListAssociativeArray(#ce#, #keyField#, #IDField#, #ApprovalStateList#)',logFile='#arguments.logfile#'); BuildValueListAssociativeArray( ce, keyField, IDField, ApprovalStateList ); } } } var i = 0; var item = ''; var elementsToClear = ''; for( i=1; i lte ListLen(arguments.elementNameList); i=i+1 ) { item = 'custom:' & ListGetAt( arguments.elementNameList, i ); if( StructKeyExists(request.site.availcontrolsByName, #item# ) ) elementsToClear = ListAppend( elementsToClear, request.site.availcontrolsByName[item].ID ); else { if( arguments.logfile neq '' ) application.ADF.utils.logAppend(msg='Error: Available Control Not found: #item#',logFile='#arguments.logfile#'); } } if( elementsToClear neq '' ) { // do the clear Application.CacheInfoCache.InvalidateByTypeList(elementsToClear, Request.Constants.rphaseAllCache, 0, 0); // all levels, indirect change, don't limit to WIP // log it if( arguments.logFile neq '' ) application.ADF.utils.logAppend(msg='...Clear Element Caches: elementsToClear:[#elementsToClear#]',logFile='#arguments.logfile#'); } var page = ''; var theURL = ''; theURL = "http://#cgi.HTTP_HOST##page#?ClearType=1"; if( arguments.logFile neq '' ) application.ADF.utils.logappend("...Rebuild Same Records: HTTP to #theURL#
","#arguments.logfile#");
var assocArray = StructNew(); var ceDataArray = ''; var indexValue = ''; var keyValue = ''; var IDValue = ''; var i = 0; var lastUpdate = ''; var lock_name = 'BuildUploadedDocValueListAssociativeArray_#arguments.customelement#_#arguments.UpDocColList#_#arguments.IDfield#'; var combo_name = '#arguments.UpDocColList#^#arguments.IDfield#'; var customElementID = request.site.AvailControlsByName['custom:#arguments.customElement#'].ID; var bAdd = 0; var fld = ''; var tmp = ''; var pos = 0; // build the memory cache structures if they don't already exist if( NOT StructKeyExists( application, arguments.memName ) ) application[arguments.memname] = StructNew(); if( NOT StructKeyExists( application[arguments.memname], 'BuildUploadedDocValueListAssociativeArray' ) ) application[arguments.memname].BuildUploadedDocValueListAssociativeArray = StructNew(); if( NOT StructKeyExists( application[arguments.memname].BuildUploadedDocValueListAssociativeArray, arguments.customelement ) ) application[arguments.memname].BuildUploadedDocValueListAssociativeArray[#arguments.customelement#] = StructNew(); if( StructKeyExists( application[arguments.memname].BuildUploadedDocValueListAssociativeArray[arguments.customelement], combo_name ) ) { // check to see if element has been updated since memory cache last build, if so need to rebuild lastUpdate = getElementTypeLastUpdate(customElementID); cacheDate = application[arguments.memname].BuildUploadedDocValueListAssociativeArray[arguments.customelement][combo_name].lastUpdated; if( isDate(cacheDate) ) dateComp = DateCompare( lastUpdate, cacheDate ); else dateComp = 0; // force rebuild // get read lock lock name="#lock_name#" type="read" timeout="20" { if( dateComp eq -1 ) { // cache is GOOD, return it // WriteOutput('
USING CACHE #GetTickCount()-start#'); return application[arguments.memname].BuildUploadedDocValueListAssociativeArray[arguments.customelement][combo_name].cache; } else { // cache is NOT good, delete cache for this entire element, and continue on. StructDelete( application[arguments.memname].BuildUploadedDocValueListAssociativeArray, arguments.customelement ); application[arguments.memname].BuildUploadedDocValueListAssociativeArray[arguments.customelement] = structNew(); } } } application[arguments.memname].BuildUploadedDocValueListAssociativeArray[arguments.customelement][combo_name] = StructNew(); application[arguments.memname].BuildUploadedDocValueListAssociativeArray[arguments.customelement][combo_name].lastUpdated = ''; application[arguments.memname].BuildUploadedDocValueListAssociativeArray[arguments.customelement][combo_name].cache = '';
ceDataArray = getCachedCEData(arguments.customElement); for( i=1; i lte ArrayLen(ceDataArray); i = i + 1 ) { // get ID if( arguments.IDField eq 'PageID' ) IDValue = ceDataArray[i].PageID; else IDValue = ceDataArray[i].Values[arguments.IDField]; for( j=1; j lte ListLen(arguments.UpDocColList); j=j+1 ) { fld = ListGetAt(arguments.UpDocColList, j); tmp = ceDataArray[i].Values[fld]; // assume in format /publications/loader.cfm?csModule=security/getfile&pageID=421802 pos = FindNoCase( 'pageid=', tmp ); if( pos ) { keyValue = Mid( tmp, pos+7, 99999 ); if( NOT StructKeyExists( assocArray, keyValue ) ) { assocArray[keyValue] = StructNew(); assocArray[keyValue].IDList = IDValue; } else assocArray[keyValue].IDList = ListAppend( assocArray[keyValue].IDList, IDValue ); } } } application[arguments.memname].BuildUploadedDocValueListAssociativeArray[arguments.customelement][combo_name].lastUpdated = now(); application[arguments.memname].BuildUploadedDocValueListAssociativeArray[arguments.customelement][combo_name].cache = assocArray;
var FieldID = 0; var formID = request.site.AvailControlsByName['custom:#arguments.customelementName#'].ID; Select * from FormInputControl where ID in ( select FieldID from FormInputControlMap where formid=#formID# ) AND FieldName = 'FIC_#arguments.fieldName#' var retString = ''; var qry = ''; select * from viewCategories where ParentCategory =
You cannot delete this category. It has child categories that must first be deleted.
select * from viewInfo where MainCategory =

You cannot delete this category. It has #qry.recordcount# info record(s) associated with it.

Delete those records first then delete this category.