Hi all.
I need Your help, I couldnt find anything in other existing topics.
I want to create a form (solution) with some database fields.
1st field is a combo box to pick the specific record. after we choose the correct entry in combobox below 2 fields should fill with data according to the choose we made. So we pick the item number and the field below should be filled with the description of the item automaticaly (from the data base).
Ive already tried different fields but I cant find a way how to use a diiferent fields from the database row, which are connected with variable.
how to do it correct? see the sample in attachment.
Bartek
Printing Data from the Form / Database collection
Moderators: Georges, milos, NiceLabel Support Team
-
- Enthusiast
- Posts: 6
- Joined: Thu Feb 20, 2020 3:19 pm
Printing Data from the Form / Database collection
- Attachments
-
- form1.PNG (2.71 KiB) Viewed 2516 times
-
- Enthusiast
- Posts: 6
- Joined: Thu Feb 20, 2020 3:19 pm
Re: Printing Data from the Form / Database collection
Additionally I want to admin that I know that I could use an object table and it would work perfectly but i want to do it with a combo box.
Is it possible?
Is it possible?
Re: Printing Data from the Form / Database collection
Hello,
yes this is possible
First of all I would make a view of your database for the combo box list.
Attach the view or entire database to your solution.
Use the database field you want as the item source for you combo box.
Next choose a source variable. When you select something in your combo box this variable will get this value.
Next attach the entire database a second time (or first time if you used a view) to your solution and put a filter on this database. I usually do an SQL statement; just add WHERE [column name] = :variablename.
This will give you a database with only the records selected via the combo box.
Of course you can show these database fields in whatever fashion you would like.
Hope this helps.
yes this is possible

First of all I would make a view of your database for the combo box list.
Attach the view or entire database to your solution.
Use the database field you want as the item source for you combo box.
Next choose a source variable. When you select something in your combo box this variable will get this value.
Next attach the entire database a second time (or first time if you used a view) to your solution and put a filter on this database. I usually do an SQL statement; just add WHERE [column name] = :variablename.
This will give you a database with only the records selected via the combo box.
Of course you can show these database fields in whatever fashion you would like.
Hope this helps.
-
- Enthusiast
- Posts: 6
- Joined: Thu Feb 20, 2020 3:19 pm
Re: Printing Data from the Form / Database collection
I did almost all, You adviced. thanks
and I can assign variable (attached to new database field with a filter) to a field. But that field presents only 1 data from the database.
So when I choose item index and will store that in a variable I can use that variable later in other fields. But in the database I have: Index, Description, CodeName.
So how can I present data in other fields? How to make a combo with index (that is already expained:)) and below two fields with data Description and CodeName which are filled wright after You choose Index from Combo?
and I can assign variable (attached to new database field with a filter) to a field. But that field presents only 1 data from the database.
So when I choose item index and will store that in a variable I can use that variable later in other fields. But in the database I have: Index, Description, CodeName.
So how can I present data in other fields? How to make a combo with index (that is already expained:)) and below two fields with data Description and CodeName which are filled wright after You choose Index from Combo?
-
- Enthusiast
- Posts: 6
- Joined: Thu Feb 20, 2020 3:19 pm
Re: Printing Data from the Form / Database collection
My fault. Sorry. You ve already explained that!.
I try keep on reading with undrestanding;)
Thanks a Lot!
I try keep on reading with undrestanding;)
Thanks a Lot!