VendorClient_Listing
QuestionDescriptionResponseTypeFormatTextHelpPreLogicPostLogic
tmpVendorSelecttemporary vendor selectionButtonBUTTONNew Vendor or ClientGLOBAL $LINENUMBERS; $LINENUMBERS=0; global $FCOLOR; $FCOLOR='RED'; $ProjectId=$_SESSION['ProjectId']; $sel=$_REQUEST['VendorSelect']; if ($sel!=~~) { $_SESSION['Instance']=ShowQueryResultScalar(~select rInstance from Responses where rUnique='$sel' and isDeleted=0~); /* SetForm('VendorClient_Detail'); */ $CaseId=ShowQueryResultScalar(~select CaseID from Responses where rUnique='$sel' and isDeleted=0~); /* SetInstanceCaseForm($_SESSION['Instance'],$CaseId,'VendorClient_Detail'); */ SetCaseForm($CaseId,'VendorClient_Detail'); } echo ~~; echo ~

Vendors and Clients

~; ExecuteSQL(~create temporary table b as (select CaseID,rValue as Name,rInstance from Responses where qID='CaseFirstName' and ProjectId='$ProjectId' and isDeleted=0) ~); ExecuteSQL(~create temporary table a as (select CaseID,tText as Type, rInstance from Responses,ResponseType where qID='CaseType' and rValue in ('V','C') and ProjectId='$ProjectId' and isDeleted=0 and tID='CSType' and tValue=rValue) ~); echo '
'; ShowQueryResult(~select distinct concat('') as Detail, Type, Name from a,b where b.CaseID=a.CaseID order by Name ~); echo ~
~; echo ~

~;

SetInstrumentForm('ControlSystem','CS_Case_Console'); $stat=1;