I have a search feature that sets a variable called varFloor to a string value. The dropdown has its default value set to this varFloor variable and displays the correct value most of the time. For some reason though, it will sometimes display the incorrect value in the control. However, when I check the dropdown's Default property value, it will show the correct value.
In the screenshot above, you can see that the value is 1 in the control but the value is actually 5 in its properties. So far this has only occurred with one specific instance, but the code is all the same for each instance, so I'm not sure why this is happening. I've tried to simply reset the control before setting the varFloor variable, but that didn't work.
Any thoughts on this? Thank you!
After several hours of extensive testing, I discovered that this only occurs in 3 specific scenarios. I tried several things to no avail, until I simply set two variables to Blank() before setting their values. This appears to have resolved the issue, and I don't entirely know why.
Thank you for your time and attempting to help me with this baffling issue!
Hi @Ryan_B ,
In cases where the user selects 1 and no changes are made to the variable, this is to be expected. Can you elaborate on the conditions of the occasions where this behaviour is observed?
That's correct to an extent. The variable value changes properly, and the dropdown visually changes to the correct value most of the time. But sometimes it'll show "1" when the value in the Properties panel says it's actually "5." You can see this in the screenshot I posted above.
Hi @Ryan_B ,
So you are saying that after you change the value of the variable that is references in the Default property, the value of the Drop Down is not updating? It should do that without using the Reset function.
Hi @BCBuizer,
I've tried to use the Reset('Control Name Here') function and then setting the variable which is set to its default value. This didn't change what happened, unless I'm misunderstanding what you meant. I can use this search feature for other instances and the dropdown changes and displays the correct value.
Hi @Ryan_B ,
The way the Default property works, is that it sets the selected value in case the user has not yet selected anything. In case you wish the dropdown to take it's default value, use the Reset() function.
WarrenBelz
146,618
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,957
Most Valuable Professional