cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lknudson1
Advocate II
Advocate II

combo box display and search columns keep reverting

I saw a similar post under Office365, but I am not using 365 and I am having similar problem.  I have a couple combo boxes with values set to various SQL selected values:

(e.g., SortByColumns(Filter('[dbo].[JobOption]',JO_Job_ID=CurJob,JO_Division=CurDiv),"JO_Type") ).

 

I don't know why, but these combos keep losing their specified Display and Search columns.  So I change them back and save and re-publish app.  Then they are ok, but at some time later, they revert back.

 

Any ideas?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @lknudson1 ,

Have you solved your problem?

 

Please also make sure the result the Filter('[dbo].[JobOption]',JO_Job_ID=CurJob,JO_Division=CurDiv) formula returns (based on the dynamic CurJob and CurDiv variables) has same data structure every time.

 

Please take a try with above solution I provided, then check if the issue is solved. If the issue has been solved, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-xida-msft
Community Support
Community Support

HI @lknudson1 ,

Could you please share a bit more about the CurJob and CurDiv mentioned in your formula? Are they variables initialized within your app?

Where do you initialize the two variables? Could you please share a bit more about the formula?

 

Based on the issue that you mentioned, I think this issue maybe related to the CurJob and CurDiv variables typed within your formula.

Please make sure that you have provided a proper initial vlaue for the two variables when you initizlied them firstly within your app. E.G. Set the OnStart property of the App control to following:

Set(CurJob, "A Initial Value");
Set(CurDiv, "A Initial Value")

 

As an alternative solution, please consider take a try to save the Filter result into a Collection, then use the Collection as data source within the ComboBox control. I have made a test on my side, please take a try with the following workaround:

Set the OnSelect property of the "Button" (where you selected a SQL value) to following:

ClearCollect(
              ComboBoxCollection,
              SortByColumns(Filter('[dbo].[JobOption]',JO_Job_ID=CurJob, JO_Division=CurDiv),"JO_Type")
)

then set the Items property of the ComboBox to following:

ComboBoxCollection

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

hi Kris Dai,
CurJob and CurDiv variables are set on initial Log-In screen based on User Login Name and are valid at the time of Combo Box Select.
 
I will try setting the combo box Collect formula on the OnSelect property and let you know if that resolves the problem.
 
Thanks!

Hi @lknudson1 ,

Have you solved your problem?

 

Please also make sure the result the Filter('[dbo].[JobOption]',JO_Job_ID=CurJob,JO_Division=CurDiv) formula returns (based on the dynamic CurJob and CurDiv variables) has same data structure every time.

 

Please take a try with above solution I provided, then check if the issue is solved. If the issue has been solved, please go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

I have been waiting for the problem to resurface prior to trying your suggestion, but the problem hasn't occurred since your original suggestion.

 

I will make sure to update in case of it happening again.

 

Thanks for looking into it!

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,060)