680
Views
7
Comments
Solved
Form to insert data into a database

Hello i have a question on how to replace some text boxes with some dropdown menus and dropdown search where i have this Table"database" of the current works and i created an add button that goes to a page to insert the data but its all text boxes and i desired to make the client text boxes into a dropdown search to link the client database and some of the other entities to have a dropdown menu for simple choices as "Yes or No" that whould be the current start of the task.

Ty for the help will leave 2 Example images


Client DropdownMenu.png
2020-07-02 13-32-59
Max de Groot
Solution

Hi Pedro,

To save the data you need to set the OnSelect property of the Dropdown Search. 

You can create a client action that holds a server action that can save the data to the database. Since you know the Id of the record selected in the table you can use this as a identifier when you store it. I don't know what your entities look like, but I would either store this directly in the table as a Foreign Key or use some mapping table. This depents on the structure of your data of course. 


2025-08-07 06-30-56
Amit J
Champion

Hi,

Can you specify, which one are you using the Reactive web app or a traditional one for development? 

UserImage.jpg
Pedro Pinto

im using a reactive web app

i found a way to get the dropdown to show me options

but i cant get the dropdown search to fetch the clients from client database

2021-11-08 12-36-10
Pedro Canário

Hi Pedro Pinto ,

As I understand it, what you are looking for is the dropdown search. See in this Link how to use.

To get the dropdownSearch go to Module > Manage dependencies > OutsystemsUI 

Is this what you are looking for?


Best Regards,

Pedro C.

2020-07-02 13-32-59
Max de Groot

Hi Pedro,

In reactive you can create a Data Action on your screen. If you want to extract the clients from a database you can do this inside this action. Create dropdown Item list as local variable and input for the dropdown values. In the Data Action call the entity holding the clients and append them to the Dropdown item list using ListAppendAll. You can use the id of the client entity as the value and the name as the text. 


Regards,

Max

UserImage.jpg
Pedro Pinto

What im looking for is to have a dropdown like in the image that allows me to fecth the client from the client database into this table that is my tasks database.

But if i select it doesnt save the information.

that and have an update button sow i can change information if needed

imagem_2022-01-31_150653.png
2020-07-02 13-32-59
Max de Groot
Solution

Hi Pedro,

To save the data you need to set the OnSelect property of the Dropdown Search. 

You can create a client action that holds a server action that can save the data to the database. Since you know the Id of the record selected in the table you can use this as a identifier when you store it. I don't know what your entities look like, but I would either store this directly in the table as a Foreign Key or use some mapping table. This depents on the structure of your data of course. 


UserImage.jpg
Pedro Pinto

i undurstand and im gladd for that coment i only dont know how to apply it as even i dont know for certain how i have it all sorted xD but will give it a go ty.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.