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 / Concatenate SQL server...
Power Apps
Answered

Concatenate SQL server Column-Show result in ComboBox

(0) ShareShare
ReportReport
Posted on by 640

Hello People,

 

I'm trying to concatenate columns as a Combobox list/search text. Below is my formula. 
Distinct(SortByColumns(Filter(Concatenate('[travel].[CourseDesc]'.FirstName," ",'[travel].[CourseDesc]'.LastName),SemesterBox_1.Selected.Result).Result,"Result",Ascending),Result)

 

Thanks,

Omi

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @omi18 
    In general, you could combine FirstName and LastName in a new column called "Full Name" like this

    AddColumns(your_datasource_name, "Full Name", FirstName & " " & LastName)

     

    Then apply the rest of your code...

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • omi18 Profile Picture
    640 on at

    Hi @mdevaney ,

     

    Thank you for your reply. 

     

    I'm not sure, what I'm missing from the formula. 

     

    Distinct(SortByColumns(Filter(AddColumns('[travel].[CourseDesc]',"Full Name",FirstName & " " & LastName),SemesterBox_1.Selected.Result).Result,Ascending),"Result")

     

    Thanks,

    Omi

  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @omi18 ,

    Your latest formula still has some problems.

    Could you tell me:

    1)what is SemesterBox_1 used for

    2)what is your filter rule? "SemesterBox_1.Selected.Result" could not represent the filter rule? filter based on which column?

    Right syntax should look like this: 

    Filter(table,SemesterBox_1.Selected.Result in fieldname)

    3)which column do you want to sort based on? "SortByColumns(.........Result,Ascending)" could not represent filter based on Result column.What's more, do you have column named Result in your '[travel].[CourseDesc]' table?

    Right syntax should look like this:

    SortByColumns(table,"fieldname",Ascending)

    4)which column do you want to get no-repeated value? "Distinct(...,"Result")" could not represent distinct by the Result column.

    Right syntax should look like this:

    Distinct(table,fieldname)

    5)'[travel].[CourseDesc]' represent what? a table? or a field? Whether does your table name '[travel]' or '[travel].[CourseDesc]'?

     

     

    I assume that you have column named Result in table '[travel]',filter based on Result column , sort based on this column, distinct based on this column.

    If so, try this formula:

    Distinct(
     SortByColumns(
     Filter(
     AddColumns(
     '[travel]',"Full Name",FirstName & " " & LastName
     ),
     SemesterBox_1.Selected.Result in Result
     ),"Result",Ascending
     ),Result
     )

     

    If my assumption is incorrect, please describe your feather more clearly.

     

    Best regards,

  • omi18 Profile Picture
    640 on at

    Hello @v-yutliu-msft ,

     

    Thanks for your comment. 

     

    1)what is SemesterBox_1 used for: To filter the semester.

    2)what is your filter rule?: Distinct(Sort(Filter('[travel].[CourseDesc]',Label2_1.Text = email1),Semester,Descending),Semester)

     

    CourseDesc table has FirstName, LastName, Course, Section, and Semester columns. 

     

    In the attached image, the User will need to select the semester and bassed on the selected semester faculty names will get filtered. Then the user can search faculty by full name.

     

    Let me know if you need more information. 

     

    Thanks,

    Omi

     

     
    Full Name.JPG
  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @omi18 ,

    Ok, do you mean this:
    1)filter based on semester?

    2)search based on full name(FirstName & LastName)?

    3)this search works for the combo box for faculty, you want to set this combo box's Items?

    Could you tell me what does this represent "Label2_1.Text = email1"? You did not mention anything about Label2_1 or email1.

    If my assumptions are all right, try this:

    semester combo box's Items:

    Distinct('[travel]',semester)

    faculty combo box's Items:

    SortByColumns(
     Filter(
     AddColumns(
     '[travel]',"FullName",FirstName & " " & LastName
     ),
     SemesterBox_1.Selected.Result in Semester
     ),
     "FullName",Ascending
     )

     set faculty combo box's search field: FullName

    //then you could search based on full name in this combo box.

     

     

     

    Best regards,

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard