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 / How best to handle two...
Power Apps
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 831 Moderator

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:
I have the same question (0)
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,325 Super User 2025 Season 2 on at

    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

  • Verified answer
    Power_Kassu Profile Picture
    44 on at

    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.

  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    @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
     )
    )

     

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard