web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Help getting the value...
Power Apps
Answered

Help getting the value of a combo box control

(0) ShareShare
ReportReport
Posted on by 86

I've got a multi-screen app.  The first screen is connected to a SharePoint form and the second screen just has input controls without a form. 

 

My intention is to pass a few of the field values from the first screen to the second screen upon Save. I'm setting global variables from the first screen's Save button. 

 

On the second screen I am setting the global variables as default for each of these fields.  On the second screen the Save button  calls a Power Automate flow and receives the field values from the second screen. 

 

Everything is working except for one combo box field that is causing me issues.  As you can see in the screenshot below, the Department field has been successfully sent from the first form on screen 1. But when the Save button is pressed and the data is sent to the flow it fails because Department appears empty.  You can see from the highlighted line below - it's empty.

 

2024-04-17_170809.png

 

I'm selecting the Department using this:

cbDepartment.Selected.DepartmentDs

 

cbDepartment.Selected.DepartmentDs always appears empty until the user actually changes it manually. 

 

The only other thing I doing is setting the DefaultSelectedItems property using the global variable I have:

gvDept

 

Why does cbDepartment.Selected.DepartmentDs come up empty?  Is there a way I can get the value without having to select the combox box?

 

Thanks,

-Greg

Categories:
  • BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    Hi @greddin1 ,

     

    Can you please share the Items property of the combo box and how gvDept is populated? I think you may populate the variable using the value, whereas the combo box requires an object.

  • greddin1 Profile Picture
    86 on at

    Here's the Items property of the combo box.  The data source is a SP list named Departments.

     

    Departments
  • greddin1 Profile Picture
    86 on at

    The global variable (gvDept) gets set from the first screen's Save button OnSelect property.

     

    Set(gvDept,DataCardValue46.Selected);
  • BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    Hi @greddin1 ,

     

    Thanks. Can you share the Items property of DataCardValue46 as well?

  • greddin1 Profile Picture
    86 on at

    Sure the Items property for the Departments on screen 1 is:

     

    Choices([@'Contractor Provisioning'].Department)

     

    This is a lookup column connected to a Departments list in SharePoint.

     

    Thanks

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @greddin1,

    I think you should set the DefaultSelectedItems property as below:

    LookUp(Departments, DepartmentColumn=DataCardValue46.Selected.Value)

    Note that DepartmentColumn should be the column in your Departments list saving the departments.

  • Verified answer
    BCBuizer Profile Picture
    22,854 Super User 2026 Season 2 on at

    Hi @greddin1 ,

     

    The issue is in that even though from the outside the output from both Items properties look the same, behind the scenes the one contains more metadata. As a result you cant use them interchangeably. 

     

    The solution is, as mentioned by @v-qiaqi-msft , to use a Lookup function in the DefaultSelectedItems property of the cbDepartment combo box. With a small correction and in combination with the variable, this looks like:

    LookUp(
     Departments, 
     DepartmentDs.Value = gvDept.Value
    )

     

  • greddin1 Profile Picture
    86 on at

    Thank you for the info and helping me get this sorted out!  Works like I need it now with that.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard