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 / Passing SearchText or ...
Power Apps
Answered

Passing SearchText or SelectedItems from ComboBox to another field?

(0) ShareShare
ReportReport
Posted on by 8

Hey there, first time caller 👋 I'm having issues with a Combo Box.

 

I'm pulling in a list data from an Excel table connector: ["Name","Campaign"]. No issues there.

Searchable is set to "true".

 

I'm trying to allow someone to either select from the existing items in the combo box (e.g., fish-fy24) or they can enter their own option (e.g., catsanddogs). Whatever they do, I need to append some text (&utm_campaign=) and then pass the entire value to a separate field. If they haven't selected anything, or typed in anything, then there should be nothing in the separate field. For my separated field, I'm using Concatenate to pull together data from other fields (including the combo box data) and then displaying that. 

 

I'm running into issues getting that data to pass to the field, but I'm also having issues NOT showing the appended text when nothing is typed-in/selected. Any help would be appreciated. See below (code and image):

 

Code:

 

Concatenate(
 If(WebsiteURL.Text <> "", WebsiteURL.Text), 
 If(UTMSource.Text <> "", "?utm_source="&UTMSource.Text), 
 If(UTMMedium.Text <> "", "&utm_medium="&UTMMedium.Text), 
 If (
 Or('cb-UTMCampaign'.Selected.Campaign <> "", 'cb-UTMCampaign'.SearchText <> ""),
 Coalesce("&utm_campaign=", 'cb-UTMCampaign'.Selected.Campaign, 'cb-UTMCampaign'.SearchText),
 ""
 ),
 If(UTMContent.Text <> "", "&utm_content="&UTMContent.Text), 
 If(UTMTerm.Text <> "", "&utm_term="&UTMTerm.Text)
 )

 

 

Image

Screenshot 2024-05-03 at 3.00.16 PM.png

Categories:
  • Verified answer
    S-Horvath Profile Picture
    8 on at

    Figured it out...changed the two lines to just !IsBlank

     

    That seems to have done the trick. 

     

    Concatenate(
     If(WebsiteURL.Text <> "", WebsiteURL.Text), 
     If(UTMSource.Text <> "", "?utm_source="&UTMSource.Text), 
     If(UTMMedium.Text <> "", "&utm_medium="&UTMMedium.Text), 
     If(!IsBlank('cb-UTMCampaign'.SearchText), "&utm_campaign="&'cb-UTMCampaign'.SearchText),
     If(!IsBlank('cb-UTMCampaign'.Selected.Campaign), "&utm_campaign="&'cb-UTMCampaign'.Selected.Campaign),
     If(UTMContent.Text <> "", "&utm_content="&UTMContent.Text), 
     If(UTMTerm.Text <> "", "&utm_term="&UTMTerm.Text)
     )

     

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard