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

Notifications

Announcements

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:
I have the same question (0)
  • 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard