11 lines
2.4 KiB
JSON
11 lines
2.4 KiB
JSON
{
|
|
"header": {
|
|
"version": 1,
|
|
"type": "record"
|
|
},
|
|
"body": {
|
|
"record1": {
|
|
"<1>": "declare subroutine update_index, rlist\r\ndeclare function send_event,post_event,msg, entid, repository, fieldcount\r\n$insert rlist_equates\r\n$insert dict_equates\r\n$insert popup_equates\r\n\r\nSelPos = .column_info->selpos\r\nCol = SelPos<1>\r\nRow = SelPos<2>\r\nif Col # 1 Then\r\n Return 0\r\nEnd\r\nPopRec = entid( @appid<1>, 'POPUP', '', 'SRPT_DICTS' )\r\nExpData = get_property( @window, '@Columns' )\r\nOverRide = ''\r\nOverRide<pdisplay$> = ExpData\r\nChoosen = repository( 'EXECUTE', PopRec, @window, OverRide )\r\nif Choosen then\r\n convert @fm to @vm in Choosen\r\n\tCurArray = .column_info->array\r\n\tCurArray = delete( CurArray, 1, Row, 0 )\r\n\tCurArray = insert( CurArray, 1, Row, 0, Choosen )\r\n\tCCnt = fieldcount( Choosen, @vm )\r\n\tfor i = 1 to CCnt\r\n\t Choosen<1,i> = ''\r\n\tnext i\r\n\tfor i = 2 to 11 ;* THERE ARE A TOTAL OF ELEVEN COLUMNS IN THE GRID\r\n\t CurArray = insert( CurArray, i, Row, 0, Choosen )\r\n\tnext i\r\n\t.column_info->Array = CurArray\r\nend\r\nreturn 0\r\n/*\r\nIf Ttable then\r\n DictTable = 'DICT.':Ttable\r\n Open DictTable To DTable Else\r\n\t Void = msg( '', DictTable: ' is in use somewhere else...' )\r\n Void = post_event( @window:'.REPORT_ID', 'GOTFOCUS' )\t \r\n\t return 0\r\n End\r\n Void = utility( 'CURSOR', 'H' )\r\n Cmd = \"SELECT \":DictTable:\" BY @ID WITH F1 = 'F' 'S'\"\r\n rlist( Cmd, target_activelist$, '', '', '' )\r\n \r\n if @reccount then\r\n Eof = 0\r\n ColArray = ''\r\n Columns = ''\r\n loop\r\n readnext DictId else Eof = 1\r\n until Eof\r\n ColArray<1> = DictId\r\n Read DictRecord From DTable, DictId Else\r\n Void = msg( '', 'ID ':DictId:' In Dictionary ':DictTable: ' can not be read...' )\r\n Void = post_event( @window:'.TABLENAME', 'GOTFOCUS' )\r\n return 0\r\n End\r\n ColArray<2> = DictRecord<dict_display$>\r\n ColArray<3> = DictRecord<dict_length$>\r\n repeat\r\n Void = set_property( @window, '@Columns', ColArray )\r\n end\r\n Void = utility( 'CURSOR', 'A' )\r\nEnd Else\r\n Void = msg( '', 'No table name has been selected...' )\r\n Void = post_event( @window:'.REPORT_ID', 'GOTFOCUS' )\t \r\nEnd\r\n*/\r\n\r\nreturn 0\r\n"
|
|
}
|
|
}
|
|
} |