cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Support
Community Support

Re: combo box display and search columns keep reverting

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

Re: combo box display and search columns keep reverting

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.
Highlighted
Advocate II
Advocate II

Re: combo box display and search columns keep reverting

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!
Highlighted
Community Support
Community Support

Re: combo box display and search columns keep reverting

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

Highlighted
Advocate II
Advocate II

Re: combo box display and search columns keep reverting

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
Check this Out

Announcing

Class of 2020- Season 2

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

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

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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