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 / Making globale variabl...
Power Apps
Answered

Making globale variable as default in a combobox

(0) ShareShare
ReportReport
Posted on by 130

Hi

 

I have created a global variable to store the name of the current customer.

 

I a screen of my app I would like to have a combobox where all the customers are listed - and the current customer is default selected.

 

It appears that the customer name is shown as default, but it has not actually been selected by Power Apps - and therefore the value is not actually default...

 

The combobox items are defined as "Table_customers".

The DefaultSelectedItems are defined as "[CurrentCustomer]"

 

I have createde a textbox with the Text defined as "ComboBox1.Selected.CustomerName" to check what is actually the choosen value - and the textbox is blank until I manually choose a customer.

 

I assume that the issue is that the variable is a text and not at table - but I don't know to change the variable into data, which can be used as a default in the combobox...

 

Please help me to get a global variable to be used as default in a combobox... 😉

(SelectMultiple = false)

 

Categories:
  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @jlke-as 

     

    1. What is your data source?
    2. Are you using an Edit Form control?
    3. Is the Customer field a Single Line Text data type? Or Choice/People Picker?
  • Verified answer
    jlke-as Profile Picture
    130 on at

    Sorry for the lack of information previously...

     

    Meanwhile I have found the solution... 😉

     

    Default values in a combobox needs to be record/table...

     

    I tried to set the DefaultSelectedItems to "[CurrentCustomer]", but the way to convert the value into a record is to use "LookUp(Table_customers;CustomerName=CurrentCustomer)"

     

    This way it works... 😉

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 350 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 318

#3
Mohsin Ali Profile Picture

Mohsin Ali 220

Last 30 days Overall leaderboard