{
    "header": {
        "version": 1,
        "type": "record"
    },
    "body": {
        "record1": {
            "<1>": "declare function dialog_box, entid, repository, set_property, get_property\r\ndeclare function fieldcount, send_event\r\ndeclare subroutine make.list\r\n$insert popup_equates\r\n\r\nCompanyKeys = dialog_box( 'COMPANY_QUERY', @window, '' )\r\nif CompanyKeys then\r\n\tPopId = entid( @appid<1>, 'POPUP', '', 'COMPANY_QUERY' )\r\n\tOverRide = ''\r\n\tmake.list( 0, CompanyKeys, '', '' )\r\n\tChoosenKeys = repository( \"EXECUTE\", PopId, @window, OverRide ) \r\n\tif ChoosenKeys then\r\n\t    convert @vm to @fm in ChoosenKeys\r\n\t    if fieldcount( ChoosenKeys, @fm ) > 1 then\r\n\t\t    Void = set_property( @window, 'QBFLIST', ChoosenKeys )\r\n            Void = set_property( @window, '@NoRead', 1 )\r\n            .co_no->text = ChoosenKeys<1> \r\n\t        Void = send_event( @window, 'READ' )\r\n\t        Void = set_property( @window, '@NoRead', 0 )\r\n\t    end else\r\n\t        .co_no->text = ChoosenKeys\r\n\t        Void = send_event(  @window:'.CO_NO', 'LOSTFOCUS', '' )\r\n\t    end\r\n\tend\r\nend\r\nRETURN 0\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/*\r\ndeclare subroutine rlist, make.list,forward_event, update_index\r\ndeclare function company_comm, rowexists, send_event, entid\r\ndeclare function repository, fieldcount\r\n$insert rlist_equates\r\n$insert popup_equates\r\n*\r\nrlist( 'SELECT COMPANY BY CO_NAME', target_activelist$, '', '', '' )\r\nif @reccount then\r\n    PopRec = entid( @appid<1>, 'POPUP', '', 'COMPANY' )\r\n    Choosen = repository( 'EXECUTE', PopRec, '', OverRide )\r\n    if Choosen then\r\n\t    convert @vm to @fm in Choosen\r\n\t    if fieldcount( Choosen, @fm ) > 1 then\r\n\t        Void = set_property( @window, 'QBFLIST', Choosen )\r\n\t        Void = set_property( @window, '@NoRead', 1 )\r\n\t        .co_no->text = Choosen<1> \r\n\t        Void = send_event( @window, 'READ' )\r\n\t        Void = set_property( @window, '@NoRead', 0 )\r\n\t    end else\r\n\t        .co_no->text = Choosen\r\n\t        Void = send_event( @window:'.CO_NO', 'LOSTFOCUS' )\r\n\t    end\r\n\tend\r\nend\r\n*/\r\nRETURN 0"
        }
    }
}