How to set up the combobox component in Client UI
If you need an additional field to select fixed values to send to your ERP system, you can use the combobox component to create a dropdown menu with predefined values. This example is designed for the Picking module in BxMobile, but can be applied to most modules that support Client UI and where adding such a field is practical.
This setup requires configuration in five modules within BxAdmin. SQL Integration, Configuration → Client Profiles, Export to ERP, Client UI and Language. The order of configuration is not critical, but starting with SQL Integration is often easiest, as it provides a reference value that must be included in the other steps.
SQL Integration
- Create a new custom query in SQL Integration and give it a name. In this example we are calling it "Combotest".
- The query must contain two columns:
id
andname
. Values can be fetched fromERP tables/columns, or they can be hardcoded.
Here is an example with hardcoded values:
select
1 id,
'ComboValg1' name
union select
2 id,
'ComboValg2' name
Configuration → Client Profiles
- Under Area: system, locate customofflinetables and add the name of the query created in SQL Integration.
- For this example, add "Combotest". This parameter allows us to download the values from the created query to the terminal.
- To include multiple queries, separate them with commas (e.g.,
Combotest
,Combotest2
,Combotest3
).
Export to ERP
- Select the appropriate module for this configuration.
- Add a new mapping:
• SourceField: Use "Combotest" (or the query name).
• Destination: Map it to the desired field in the ERP system.
• Enable the mapping by selecting the Enabled checkbox. - Ensure the SourceField name matches what is defined in Client UI.
Client UI
Screen | Specify the "Combotest" screen, e.g., PickingList . |
Name | Assign a descriptive name like "Combotest". Alternatively, overwrite an existing field (e.g., "Batchno") if unused, ensuring its position and width match. |
Enabled | Yes. |
SourceObject | "Combotest" (query name from the SQL Integration). |
SourceField | "Combotest" (sourcefield name from Export to ERP). To send the query id by default, use combotest . To send the name instead, use combotestname . |
Visible | Yes (optional, but recommended). |
X-Position | Define the column (1 is typical). Avoid 2 or 3 unless replacing an existing field like "Batchno". |
Y-Position | Define the row. For this example, use 3. |
Width | Set the width. Use 3 for full screen width. |
Component | Select "Combobox". |
Label text | Use a short label like "Comb:" (limited to 4-5 characters). |
Language
Adding translations is optional, but useful for clarity.
Go to Language in BxAdmin, click Add, and configure:
- Phrase ID: Use the query name (e.g., "Combotest").
- Translation: Define the display text, such as "Combotester". On the terminal, this will show as: "Combotester received".
Copy the configuration code below, adjust the values, and paste it (CTRL+C, CTRL+V) in Language in BxAdmin - Combotest must be adjusted after textid and text before saving in BxAdmin.
[{"id":3972,"language":"no","routine":"general","screen":"entryscreen","textid":"combotest","text":"Combotester"}]
BxMobile
In BxMobile, refresh the data and download the settings. The resulting dropdown will now be displayed and functional.