cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Update Lookup values in Combox after list Item added

hello there,


I have a combo box that lets users select from a custom list in a related table.  If the item isn't there, a button next to it allows them to go to an add item form.   They can then add the item, hit save.  Up to there everything is working well.

 

The issue is when they return to the first form, the combo box doesn't reflect the added item.


I tried Refresh(Dataconnection) but that doesn't seem to refresh the values in the combo box.

 

UpdateContext as I understand it only works for variables on that screen.

 

Appreciate the extra brainpower on this one.


Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

You will need to look at how your combobox is getting its Items.

If it is not getting them from a refreshed datasource, then it will not change.

 

If you want to consider using a variable for it - yes, UpdateContext would only be screen specific in scope.  You will want to look at the Set statement to do this.

 

Possibly setting a variable with the items in it and assigning it as the Items to the combobox.  Then when the user adds one, refresh (recreate) the variable.

 

   Set(comboItems, filterOrChoicesOrWhateverGetsYourDataforTheList)

 

 

ComboBox:

   Items Property - comboItems

 

After you add a new item:

   Do the set statement again shown above.

 

Ultimately, you could also just consider putting in the selection of your items into the Items statement itself and then it will refresh when you refresh the underlying datasource.

 

I hope that helps and is somewhat clear.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

2 REPLIES 2
Highlighted
Super User III
Super User III

You will need to look at how your combobox is getting its Items.

If it is not getting them from a refreshed datasource, then it will not change.

 

If you want to consider using a variable for it - yes, UpdateContext would only be screen specific in scope.  You will want to look at the Set statement to do this.

 

Possibly setting a variable with the items in it and assigning it as the Items to the combobox.  Then when the user adds one, refresh (recreate) the variable.

 

   Set(comboItems, filterOrChoicesOrWhateverGetsYourDataforTheList)

 

 

ComboBox:

   Items Property - comboItems

 

After you add a new item:

   Do the set statement again shown above.

 

Ultimately, you could also just consider putting in the selection of your items into the Items statement itself and then it will refresh when you refresh the underlying datasource.

 

I hope that helps and is somewhat clear.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Highlighted
Anonymous
Not applicable

That was the link I was missing, adjusted the datasource for the combo box and all is right in the world.

Thanks Randy,

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (11,502)