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 / Split URL from Datacar...
Power Apps
Unanswered

Split URL from Datacardvalue.HtmlText

(0) ShareShare
ReportReport
Posted on by 41

Hi folks, Super simple one to start your day/evening and get some kudos. 
Sadly, I've been stuck on it for hours and I'm starting to get the PA Sweats.

Basically I'm trying create a variable containing a url string from form a DataCardValue that has a link.

Super simple right!

Note: I'm trying to initialize the variable when the screen opens (OnStart), outside of the form environment.

I started with this.. 

 

Set(varPdfLink, Text(DataCardValue.HtmlText))

 

But this gives me the HTML tags as well. (I only want the url)

 

<a href='https://mysite.pdf'>https://mysite.pdf</a>

 


I've since tried a number of ways to split the string to just get the url.

I've come from a Power Automate workflow where this would be something simple like...

 

Split(Text(DataCardValue.HtmlText), "'")[1]

 


But indexing doesn't work and I just can't seem to understand how to approach this.

Should it be a ClearCollect or a Set function, for starters.

I've seen methods using Mid(), First(LastN()) but the variable always resolves to blank. 

I'm not sure if it's correct and I'm just missing something because I have to load the page in runtime to get the variable set from the DataCardValue.

Any Help would be appreciated. Thanks!

Categories:
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @PHCMA ,

     

    According to the expression in the flow, I think you can get the result using below formula:

    Last(FirstN(Split(DataCardValue.HtmlText, "'"),2))

     

    Best regards,

  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @PHCMA

     

    This should work:

     

    Index(
     Split(DataCardValue.HtmlText, "'"),
     2
    ).Value

     

     

    SpongYe_2-1698307461721.png

     

    If you have any questions or feedback, please let me know. Have a great day! 😊


    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

     

     

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

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard