Page 1 of 1

Printing Data from the Form / Database collection

Posted: Thu Feb 20, 2020 3:33 pm
by bartek.skrajnowski
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

Re: Printing Data from the Form / Database collection

Posted: Fri Feb 21, 2020 1:29 pm
by bartek.skrajnowski
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?

Re: Printing Data from the Form / Database collection

Posted: Fri Feb 21, 2020 1:44 pm
by highfrost
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.

Re: Printing Data from the Form / Database collection

Posted: Fri Feb 21, 2020 2:46 pm
by bartek.skrajnowski
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?

Re: Printing Data from the Form / Database collection

Posted: Fri Feb 21, 2020 2:49 pm
by bartek.skrajnowski
My fault. Sorry. You ve already explained that!.
I try keep on reading with undrestanding;)
Thanks a Lot!