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 Automate / Getting a number from ...
Power Automate
Answered

Getting a number from a URL

(0) ShareShare
ReportReport
Posted on by 375

Hi 

I have a SharePoint Online list and I am able to loop through each row.

One column URL, has values like this ...

 

http://myserver/tikitlink/tikitlink.asp?doc=12345&lib=lib1

 

How can I extract the doc number?

 

I tried to use this ...

uriPathAndQuery(items('For_each')?['URL'])

which gives me 

/tikitlink/tikitlink.asp?doc=12345&lib=lib1

 

but I get stuck there.

 

Thanks

P

 

Categories:
I have the same question (0)
  • pmwhelan Profile Picture
    375 on at

    Like this?

    first(split(split(item()?['URL'], 'doc='), '&'))
    It fails.
    InvalidTemplate. Unable to process template language expressions in action 'Set_variable' inputs at line '0' and column '0': 'The template language function 'split' expects its first parameter to be of type string. The provided value is of type 'Array'. Please see https://aka.ms/logicexpressions#split for usage details.'.
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @pmwhelan,

    Modify as below:

    first(split(last(split(uriPathAndQuery(items('For_each')?['URL']),'doc=')),'&'))
  • pmwhelan Profile Picture
    375 on at

    Thanks!

     

     

     

     

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard