the SQL selection functions exposed on the compiler return result objects which with the specific functions can be extracted and exploited. We will now show some of them.
Query_FieldName(QueryName : String, FieldIndex : Integer);
Query_FieldsCount(QueryName : String);
Query_RecordsCount(QueryName : String);
Query_FieldValue(QueryName : String, FieldName : String);
Query_FieldValue_Locate(QueryName, FieldName, FieldValue : String);
Query_First(QueryName : String);
Query_Next(QueryName : String);
Query_Last(QueryName : String);
Move active record to 1st. Return active Record Number
Signature
Query_Prior(QueryName : String);
VAR Result : String;
VAR Result2 : String;
VAR FileID : String;
VAR ValueStr: String;
VAR Count,i : Integer;
ArrayInsertValue('Authorised', 0, '677440031');
ArrayInsertValue('Authorised', 1, '675840531');
ArrayInsertValue('Authorised', 2, '1234567890');
IF ArrayIndexOf('Authorised', USER_PhoneNumber ) <> '-1' THEN
(
FileID := '8';
Result := CRM_Select('Query1',FileID, '*','', '',1);
Count := Query_RecordsCount('Query1');
Result := MenuItemAdd('MyMenu','Select', '', '', '', '', '', '', '', '');
Query_First('Query1');
FOR i:=0 TO PRED(Count) DO
(
ValueStr := Query_FieldValue('Query1', 'Name');
Result := MenuItemAdd('MyMenu',IntToStr(i+1)+'. '+ValueStr, ValueStr, IntToStr(i+1) , '', '', '', '', '', '', '');
Query_Next('Query1');
);
Result := InputMenu('MyMenu', 60000, '', '');
Exit;
)
ELSE
(
Result := 'Unauthorized ACCESS ' + USER_Name;
Exit;
);