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

Update data source using a text field

Here is what I am attempting to do. I have a combo box that lists products that the user chooses. In some cases there will be a new  product that is not in the combo box. I want to allow users to enter the new product in a text box and submit the new product which gets added to the data source for the combo box. I imagine there would need to be some way to force a data source and combo box refresh. Is this possible?

7 REPLIES 7
Helper IV
Helper IV

This idea may work for you or not, depends on your detailed requirements. However, try this,

 

  • Instead of putting the data source directly on the combo box, use a timer control to load the data into a collection
  • Put the source of the combo box as the collection instead
  • Use a separate screen or set of controls or however you prefer it to push the data from your text box into the data source
  • Depending on how your dependencies are, do either of the following to load the new value into the combo box
    • Trigger the timer control to run again and load the data again into the collection. The combo box would then get the new info
    • If its a simple entry and you can do it without needing much information from the data source, once the source is updated successfully, simply add the entry to the collection so that you do not have to make an extra call

Hmmm. I'm just starting out with Power Apps and haven't run across collections yet. I'll have to dig deeper there.

"Instead of putting the data source directly on the combo box, use a timer control to load the data into a collection"

 

How is this done?

Anyone have an idea how to do this? I've been searching and have not found a solution.

Frequent Visitor

Have you tried to refresh your data source in on visible property of your screen like Refresh(table name) ?

Helper III
Helper III

I'm finally circling back to this. This doesn't seem to be working for me and the directions here are unclear. At least to me. Anyone else have any ideas?

 

Helper III
Helper III

For the heck of it I tried something really simple. I did a Patch of the datasource with the value in the text box. Guess what happened? The value was added to the datasource and the combo box was automatically updated. Is it really that easy? Can anyone confirm or is this going to break when I deploy?

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (88,625)