Skip to main content

Notifications

Community site session details

Community site session details

Session Id : XmJMG6Fofg2w2d8wF5/RKn
Power Pages - General Discussions
Suggested answer

Liquid - request.url fetch the record id

Like (0) ShareShare
ReportReport
Posted on 24 Oct 2024 17:12:24 by 34
Hello Everyone
 
Please help me with my need to get the url parameter.
 
I am using this liquid code {{request.url}}
 
 
Which is the best way to extract the id from this url.
 
I look forward to your advice.
 
Thank you!
 
Goverdhan
Categories:
  • Suggested answer
    govejayaram Profile Picture
    34 on 16 Nov 2024 at 08:24:52
    Liquid - request.url fetch the record id
    Hello Everyone
     
    Please visit this thread.  Assign Account id to a Form
     
    This thread has more detailed description of my problem and a suggested solution.
     
    If anyone has similar problem, they may like to use the knowledge given here and, in the thread, above.
     
    Have a wonderful day!
     
    Goverdhan
  • govejayaram Profile Picture
    34 on 15 Nov 2024 at 00:21:51
    Liquid - request.url fetch the record id
    Thank you SaiRT14  and CU11111813-1
     
     
    Goverdhan
     
  • Suggested answer
    SaiRT14 Profile Picture
    1,966 Super User 2025 Season 1 on 14 Nov 2024 at 22:04:08
    Liquid - request.url fetch the record id
    pls try the following:
     
    {% assign url = request.url %}
    {% assign queryString = url | split: '?' | last %}
    {% assign idParam = queryString | split: '&' | where: 'contains', 'id=' | first %}
    {% assign id = idParam | split: '=' | last %}
    ID: {{ id }}
     
  • CU11111813-1 Profile Picture
    10 on 11 Nov 2024 at 20:23:59
    Liquid - request.url fetch the record id
    Simply use liquid like this: {{request.params.id}} where id is the name of the parameter. Works for any request parameter.

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 Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Pages - General Discussions

#1
WarrenBelz Profile Picture

WarrenBelz 9 Most Valuable Professional

#2
Rondel Profile Picture

Rondel 6

#3
oliver.rodrigues Profile Picture

oliver.rodrigues 4 Most Valuable Professional

Overall leaderboard