cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Upload Dropdown values on Database

Good Morning Friends!

I need a little bit of help please.

I've a PowerApp that has many tables, one of them, that is the final, uses some fields to insert values in the database, and I have some dropdown values that come from other tables to improve the information already uploaded.

I can't find a way to upload this values to the database too, only the values that are in the DataCards.

Do you have some idea to help me?

Thanks a lot.

Regards,

Robson, from Brasil.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Upload Dropdown values on Database

So -- I'm not certain about your tables and where they are coming from...but consider this.

 

I build Dropdown_Tipos

 

In Dropdown_Tipos, I set:

Items = TBL_TipoCavalo

Value = TipoCavalo

 

Now my dropdown menu has 2 options:  Toco and Trucado.

 

In my datacard for TipoCavalo in Form_Cadastros -- it looks like we want the ID, not Toco or Trucado, yes?

 

So in my datacard, I set:

 

Update = Dropdown_Tipos.Selected.Id_TipoCavalo

View solution in original post

14 REPLIES 14
Highlighted
Continued Contributor
Continued Contributor

Re: Upload Dropdown values on Database

You could create a flow to insert the new ercord into the database.

 

 

Go to the action tab in PowerApps go to flows, click this, then in the right hand sidebar > create flow.

 

Then onSelect on a submit button, run the flow.

 

Sean

Highlighted
Community Support
Community Support

Re: Upload Dropdown values on Database

Hi @rgparisoto,

 

That would depend on the table data structure in the database, and how you would like to update the data into database.

Besides,  could you please explain a bit for the meaning of "Improve"?

If the values from the dropdown have a field defined in the target table of the database, then we could add a corresponding DataCard, and bound this DataCard with the corresponding field, after that, just use the submitform function to update it together with the other fields.

For DataCard and forms, please check the article below for more details:

Understand data forms in Microsoft PowerApps

 

If adding a data card is not available, then we could take use of patch function to update the Dropdown value into database, for function usage, check:

Patch function in PowerApps

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Helper V
Helper V

Re: Upload Dropdown values on Database

Hello friends!

Coming back now.

I'll answer faster.

Highlighted
Helper V
Helper V

Re: Upload Dropdown values on Database

Michael!

Improve is insert, increase... Smiley Embarassed

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Upload Dropdown values on Database

I would look into the Patch function, like @v-micsh-msft mentioned.

 

You can do something along these lines...

 

Patch(Datasource,{fieldname:dropdown.Selected.value})

 

It's hard to get you closer than that without seeing your application, but I think this is what you're needing.

Highlighted
Helper V
Helper V

Re: Upload Dropdown values on Database

Thank you NEPatton!

 

Let me try to explain:

 

I have a table called TipoCavalo, with a column with ID, and a column with Tipo, like this:

TipoCavaloTable.png

 

 

And I have another table called Cadastros, with these columns:

CadastrosTable.png

 

At the Power Apps, I have this form:

PowerAppFormCadastros.png

 

I'm trying to send the information that the user select at the dropdown to the TipoCavalo DataCard.

 

Can you understand better now?

 

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Upload Dropdown values on Database

Help me to know if my understanding is correct.

 

You only want to update data in the Cadastros table, but you want to provide a drop down menu for TipoCavalo values that come from the TipoCavalo table.

 

Correct?

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Upload Dropdown values on Database

If my understanding is correct, then try this:

 

Set the "Update" property of your datacard to Dropdown.Selected (or a field in .Selected as necessary).

 

You can actually put a custom dropdown inside of the datacard and delete the dropdown that is automatically generated.  This makes things look pretty seemless in your App.

Highlighted
Helper V
Helper V

Re: Upload Dropdown values on Database

Good notices NEPatton!

 

Works, but, instead of the name like "Toco" or "Trucado", appears only the ID of the field.

 

Can I change it for the ID, to connect the tables after?

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,576)