Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

How best to handle two pieces of data that need to be concatenated in some circumstances?

(0) ShareShare
ReportReport
Posted on by 821 Super User 2025 Season 1

I have an app where I am letting users enter in a URL. For easy of use, and the ability to prompt them if they forget, I use a dropdown for them to choose the protocol (http:// or https:// ) . Then the have a text field to enter in the domain and whatever addtional directory structure. It looks like this:

 

futr_vision_0-1707514249586.png

Here is what I am trying to figure out. I have the above set up in my edit form. I record the domain portion in a table and concatenate the protocol to the front of that so they can see and copy the full URL. No problems here. The problem is I give them the ability to edit this record. Since the protocol is not written to the Dataverse table then, when they select the record from the gallery, the edit form only contains the domain portion. There is nothing to inform the dropdown what to select.

 

I am wondering what the best way might be to approach this. I was thinking maybe I write the full URL to the table and then in the edit form I can trim off the protocol and fill in the text field and somehow do the same for the dropdown by trimming off the domain portion.

 

Second option, and it might be the easiest, is to simply create a protocol column in the table and break out the protocol into it's own data card. 

 

Thoughts?

Categories:
  • Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: How best to handle two pieces of data that need to be concatenated in some circumstances?

    @futr_vision I would recommend the second option. Since you're giving users the option to select the protocol in the first place, it would stand to reason that you will likely want them to change the protocol when editing the item (for example if they made a mistake when saving the record for the first time).

     

    To give you a full answer, if you must over engineer things and want to avoid creating a new column, you can of course embed the dropdown control for the protocol inside the DataCard for the URL column, and then continue to Concatenate both the Dropdown selection and the URL selection into the DatCard Update property. 

     

    Concatenate(
     'Your Protocol Dropdown'.Selected.Value,
     'Your URL Text Input'.Text
    )

     

     

    You can then apply the below to the Default property of the Dropdown control to return the original protocol selection:

     

    With(
     {
     _protocol: Left(
     Parent.Default,
     Find(
     "//",
     Parent.Default
     ) + 1
     )
     },
     LookUp(
     [
     "https://",
     "http://"
     ],
     Value = _protocol,
     Value
     )
    )

     

  • Verified answer
    Power_Kassu Profile Picture
    44 on at
    Re: How best to handle two pieces of data that need to be concatenated in some circumstances?

    Hello! @futr_vision 

    I would save the protocol also to dataverse in its own column.

     

    It's easy to save to dataverse and if the protocol doesn't need to be updated, you can just add the protocol in domain datacard as a view-only label. If it needs to be able to update, then you can just create two data cards.

     

    I'm not sure how much does it hinder the UX but it would definetely be the easiest solution from developer side imo.

  • Verified answer
    Michael E. Gernaey Profile Picture
    40,844 Super User 2025 Season 1 on at
    Re: How best to handle two pieces of data that need to be concatenated in some circumstances?

    Hi @futr_vision 

     

    Shouldnt they be able to edit that too?'

     

    So yeah store it in a column.

    Agree
    If I have helped you, I would really appreciate if you please Mark my answer as Resolved/Answered, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,618 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,957 Most Valuable Professional

Leaderboard