cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User
Super User

Re: Update Lookup values in Combox after list Item added

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.

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Update Lookup values in Combox after list Item added

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.

View solution in original post

Anonymous
Not applicable

Re: Update Lookup values in Combox after list Item added

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (7,771)