Dynamic Static Entity Dropdown Does Not Load Values
This troubleshooting guide describes common issues that prevent dynamic static entity dropdowns from displaying values correctly.
Typical issues
Section titled “Typical issues”Common issues include:
- The dropdown does not open.
- XLS-sourced entries do not appear in the dropdown.
- Dropdown values display as
Undefined.
Cause: XLS source file not found
Section titled “Cause: XLS source file not found”The static entity only loads entries when the XLS source file can be located and loaded successfully.
Verify that:
- The XLSX file name in the dynamic entries script matches the uploaded file name exactly,
- The XLSX file extension is correct, and
- The XLSX file has been uploaded to the Lowgile platform’s File System (Platform editor -> Administer -> File System).
For example:
const xls = await Sys.Xls.SimpleXls.fromFile('list-materials.xlsx', 'xlsx')The file name must exactly match the uploaded resource name. If the file name is anything other than list-materials.xlsx, the data won’t be loaded into the static entity.
Cause: Incorrect worksheet name
Section titled “Cause: Incorrect worksheet name”If the worksheet name does not exist, the XLS parser cannot load the entries.
Verify that the worksheet name matches the spreadsheet tab exactly.
For example:
return xls.parseToObjects({ sheetNameOrNumber: 'Materials' })The worksheet name must match the spreadsheet tab name exactly, including letter casing. For example, Materials, MATERIALS, and materials are interpreted as different worksheet names.
Cause: Spreadsheet columns do not match static entity properties
Section titled “Cause: Spreadsheet columns do not match static entity properties”The spreadsheet column headers and static entity property names must match.
You can achieve this in either direction:
- Update the spreadsheet column headers to match the static entity properties, or
- Update the static entity properties to match the spreadsheet column headers.
The important point is that the names must match exactly so Lowgile can map each spreadsheet column to the correct static entity property.
For example, if the spreadsheet contains the following column headers:
id,name, andalternateNames,
then the static entity should contain matching properties so the spreadsheet data can be loaded correctly.
The spreadsheet values must also be compatible with the configured static entity property types.
For example:
- Numeric spreadsheet values such as
1,2, and3can be loaded intostringproperties, - But text values such as
id 1,id 2, andid 3cannot be loaded intonumberproperties.
If the spreadsheet values are incompatible with the configured property type, the static entity may fail to load correctly.
Cause: Dropdown values display as Undefined
Section titled “Cause: Dropdown values display as Undefined”This issue is commonly caused by spreadsheet column names that do not match the static entity property names described in the previous section.
When Lowgile cannot map spreadsheet values to the configured static entity properties, dropdown values may display as Undefined.
Also verify that the static entity display column points to a property that is populated by the spreadsheet data.
Isolate XLS loading issues
Section titled “Isolate XLS loading issues”To determine whether the issue is caused by the XLS source or the dropdown configuration, temporarily replace the dynamic entries script with hardcoded values.
For example:
async function optionsList(): Promise<This.Materials.Entry[]> { return [ { id: 1, name: 'Steel', alternateNames: 'Carbon steel, mild steel', $displayValue: '' }, { id: 2, name: 'Aluminium', alternateNames: 'Aluminum, Al', $displayValue: '' } ]}Attention
When hardcoded values are used for testing, the generated Entry type may require $displayValue.
Add $displayValue: '' to each test object if the build reports that the $displayValue property is missing.
If the dropdown loads correctly using hardcoded values, the issue is likely related to the XLSX file, worksheet name, or spreadsheet column mapping.