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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,892)