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 / Add A space between 2 ...
Power Apps
Answered

Add A space between 2 combobox displayfields items

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello everyone, 

 

I have a combobox and it has a table as DisplayFields property : ["cref8_firstname","cref8_lastname"]


This gives me as options (example):

  • JaneDoe
  • JoSmarts
  • EllenVivs

However i would like it to have a space in between the firstname and lastname. This would give me:

  • Jane Doe
  • Jo Smarts
  • Ellen Vivs

I tried a few things:

  •  ["cref8_firstname"," ","cref8_lastname"]
  • ["cref8_firstname& " "&cref8_lastname"]
  • I also tried concating etc but nothing really worked

Anyone knows how to do this simple magic?

 

Kind regards,

 

Anthony

 

 

Categories:
  • Verified answer
    Irfan Profile Picture
    164 on at

    Hi @AnthonyDo 

     

    I dont believe you can achieve that directly through ComboBox.

     

    You will need to have a custom column which stores your concatenated values.

     

    Eg: In my case, I had a collection called as coll_Owner. I am using columns Owner and Num from the collection.

    Irfan_0-1629359252900.png

     

    Now if I want to use a ComboBox to show me "Owner Num" in a single row in combobox, I'll need to create another collection which stores the concatenated values

    ClearCollect(collFinallist,AddColumns(coll_Owner,"Owner + Value",Concatenate(Owner, " ", Num)))

     

    ComboBox

    Use collFinallist as my datasource for my combobox.

    Irfan_2-1629359436302.png

     

     

    Either you can add column to your collection OR you can add extra column to your datasource which will hold the concatenated values.

     

    Bit of a pain but I dont believe there is an easy way out of this 🙂

     

    Hope it helps.

     

    -Irfan

  • eka24 Profile Picture
    20,925 on at

    How is the data in the column structure? Because that determines whether the names are joined or not.

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

     

  • runner9207 Profile Picture
    2 on at

    Could you elaborate on this more?  I have a table with a lookup field in Microsoft Dataverse and am running into this same issue.  What do I need to adjust in the table so that the data pulled from the columns doesn't join?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I fixed it this way:

     

    First i made a collection with all the records in it. Then i made another collection and added a column that concatenates the first and lastname. I did that in the onvisible of my home screen. You could do this on onstart of your app aswell or however you like.

     

    Onvisible Homescreen: 

     

    Collect(
     colEmployeeTrainingDropdown,
     galEmployees.AllItems
    );
    Collect(
     colEmployeeTrainingDropdown2,
     AddColumns(
     colEmployeeTrainingDropdown,
     "Name",
     Concatenate(
     'First Name',
     " ",
     'Last Name'
     )
     )
    )

     

     

    Then for the dropdown you use the following formulas:

     

    Items: colEmployeeTrainingDropdown2

    DisplayFields: ["Name"]

     

    Kind regards,

     

    Anthony

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 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard