How to import a large dropdown?

Hi.  I've followed the instructions on this post  How to import dropdown values but the dropdown list isn't being updated. I have posted on that thread asking for help but I assume that as it's marked as 'answered' that it's being overlooked.

Not sure where I'm going wrong, if anyone could help I'd really appreciate it.

Manifest:

<?php

$manifest = array (
'built_in_version' => '13.0',

'acceptable_sugar_versions' => array(
'regex_matches' => array(
'7\\.9\\..+$',
'7\\.10\\..+$',
'7\\.11\\..+$',
'8\\.[0-9]\\..+$',
'9\\.[0-9]\\..+$',
'10\\.[0-9]\\..+$',
'11\\.[0-9]\\..+$',
'12\\.[0-9]\\..+$',
'13\\.[0-9]\\..+$',
),
),

'acceptable_sugar_flavors' => array (
0 => 'ENT',
1 => 'ULT',
2 => 'PRO',
),

'readme' => '',
'key' => '',
'author' => 'jk',
'description' => 'test dropdown import',
'icon' => '',
'is_uninstallable' => true,
'name' => 'test_dropdown_import',
'published_date' => '2023-08-16 16:00:01',
'type' => 'module',
'version' => 1.9,
'remove_tables' => 'prompt',
);

$installdefs = array (
'id' => 'test_dropdown_import',
'language' =>
array (
0 =>
array (
'from' => '<basepath>/custom/Extension/application/Ext/Language/en_UK.testEP_templates_detail_list.php',
'to_module' => 'application',
'language' => 'en_UK',
),
),
);


en_UK.testEP_templates_detail_list.php contains

<?php

$app_list_strings['testEP_templates_detail_list']'P00'=>'Link records';
$app_list_strings['testEP_templates_detail_list']'P01'=>'Verbal advice given';
$app_list_strings['testEP_templates_detail_list']'P02'=>'Memo';
$app_list_strings['testEP_templates_detail_list']'P04'=>'Abatement Notice S80';
$app_list_strings['testEP_templates_detail_list']'P05'=>'Enforcement Notice Section 34';
$app_list_strings['testEP_templates_detail_list']'P06'=>'Notice Letter';

Thanks in advance.

James

Parents Reply Children
  • Can you post the contents of your updated file: custom/Extension/application/Ext/Language/en_UK.testEP_templates_detail_list.php please?

    The original one you had in the install file (as above and pointed out by ) contained invalid PHP code which would have prevented it loading the data into the list. Maybe we should just rule out that as a cause again.

    Thanks,

    JH.

  • Hi John.  I've commented out the code form my original post and used the suggested alternative. The file is as follows:

    <?php

    $app_list_strings['testEP_templates_detail_list']=array (
    'P00'=>'Link records',
    'P01'=>'Verbal advice given',
    'P02'=>'Memo',
    'P04'=>'Abatement Notice S80',
    'P05'=>'Enforcement Notice Section 34',
    'P06'=>'Notice Letter',
    );
    // $app_list_strings['testEP_templates_detail_list']'P00'=>'Link records';
    // $app_list_strings['testEP_templates_detail_list']'P01'=>'Verbal advice given';
    // $app_list_strings['testEP_templates_detail_list']'P02'=>'Memo';
    // $app_list_strings['testEP_templates_detail_list']'P04'=>'Abatement Notice S80';
    // $app_list_strings['testEP_templates_detail_list']'P05'=>'Enforcement Notice Section 34';
    // $app_list_strings['testEP_templates_detail_list']'P06'=>'Notice Letter';
    // $app_list_strings['testEP_templates_detail_list']'P07'=>'Notice breach letter';