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
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
Highlighted
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

Highlighted
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
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

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.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (4,764)