cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Dropdown Default Not Accepting Global Variable

Hello,

 

I have an app with dropdown controls on two screens.  Both dropdowns have the same item formula and show the same items available.

 

On screen 1 the dropdown accepts a global variable as Default and changes selected item as as the global changes. 

 

On screen 2 the dropdown does not accept the global variable and instead gives the error "Expected Record value". 

 

I can change the value of the screen 1 dropdown as well as label and textbox values on both screens by changing the global value on a button click.

 

Why does one dropdown not accept a global variable as Default and the other one does?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Dropdown Default Not Accepting Global Variable

Hi @jarodpearcy ,

Could you please share a bit more about the second Dropdown that you mentioned? Is it a Dropdown control or a ComboBox control?

Further, could you please show more details about the formula you set within the Items property of the two Dropdown boxes?

 

Based on the issue that you mentioned, I think the Second Dropdown (in a Data card of a Edit form) that you mentioned is a ComboBox control rather than a Dropdown control, is it true?

 

If the Second Dropdown box that you mentioned is a ComboBox, I think there is something wrong with formula you used to set the Default value within the Second Dropdown box (ComboBox).

If you want to set a default value within a ComboBox control, please set the DefaultSelectedItems property of the ComboBox to following:

{
  Value: YourGlobalVariable
}

Please take a try with above solution, then 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.

View solution in original post

3 REPLIES 3
Highlighted
Helper I
Helper I

Re: Dropdown Default Not Accepting Global Variable

An additional note: The dropdown that won't accept the global variable for the Default value is in a datacard and the dropdown that does accept the global is not.

Highlighted
Community Support
Community Support

Re: Dropdown Default Not Accepting Global Variable

Hi @jarodpearcy ,

Could you please share a bit more about the second Dropdown that you mentioned? Is it a Dropdown control or a ComboBox control?

Further, could you please show more details about the formula you set within the Items property of the two Dropdown boxes?

 

Based on the issue that you mentioned, I think the Second Dropdown (in a Data card of a Edit form) that you mentioned is a ComboBox control rather than a Dropdown control, is it true?

 

If the Second Dropdown box that you mentioned is a ComboBox, I think there is something wrong with formula you used to set the Default value within the Second Dropdown box (ComboBox).

If you want to set a default value within a ComboBox control, please set the DefaultSelectedItems property of the ComboBox to following:

{
  Value: YourGlobalVariable
}

Please take a try with above solution, then 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.

View solution in original post

Highlighted
Helper I
Helper I

Re: Dropdown Default Not Accepting Global Variable

@v-xida-msft ,

 

Thank you for  your reply.  The control is indeed a combobox.  It was autogenerated in the form and looked identical to a dropdown.  Now I know the difference.

 

Your suggestion of using

{
  Value: YourGlobalVariable
}

worked.

 

Thank you for your insight. 

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (6,461)