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 Pages / Iterate through Reques...
Power Pages
Answered

Iterate through Request parameters

(0) ShareShare
ReportReport
Posted on by 30

Hi All-

I'm trying to iterate through the request parameters to get an idea of what kind of data I have access to there. However, I'm having trouble figuring out the accessor attributes for individual params, so all I get is a list of blank list items.

<ul>
{% for par in params %}
<li>{{ par.key }} : {{ par.value }}</li>
{% endfor %}
</ul>

 

What am I missing?

Thanks!

 

Categories:
I have the same question (0)
  • Verified answer
    OOlashyn Profile Picture
    3,496 Most Valuable Professional on at

    Hi @BrennanPhoenix ,

     

    First of all, it should not be just params it is request.params. More about request liquid object you find in official docs here. As per MS description params contains: "Named parameter values for the current request. params is a combination of URL query string parameters, form post parameters, and cookies.". So it contains a lot of data. It doesn't store that data in a name-value pair as an object. Rather it is some sort of object (implementation of which is hidden from us) where possible values stored in an array where the first value is the name of the parameter and second is its value. For example, if your URL will have dataId parameter with value 12345 it will be stored in params like this [dataId, 12345]. So you cannot just iterate through possible values, you need to know them. If you want to see all the available data I would advise you to output it in the console using something like this:

    <script>
    console.log("params",`{{request.params}}`);
    </script>

     I am using template strings because request.params contain a lot of special characters and spaces.

  • BrennanPhoenix Profile Picture
    30 on at

    Thanks @OOlashyn -

     

    This is what I was looking for 😀

    Sadly, I was hoping that along with Form Fields they might include file upload data 😥

    Still, there is plenty here to work with.

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 Pages

#1
Fubar Profile Picture

Fubar 89 Super User 2025 Season 2

#2
Jerry-IN Profile Picture

Jerry-IN 75

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard