cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bishwaroopdey
Frequent Visitor

Send data from a page to next page

I have fetched data from a table and displayed it in a liquid template. Now I want to send the fetched data to the next page. How can I do it?

This is the fetched data:

<p>{{ item.cr271_price }}</p>
How shall I send it to the next page?
1 ACCEPTED SOLUTION

Accepted Solutions

Hi @bishwaroopdey,

I assume that your Book now button is a link or something similar. What you can do is add id of the record you would like to pass (or any other identifier that you want) to the url and then use request liquid object (see here - https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/liquid-objects#request) on the new page to get that id or other data that you pass and then fetch whatever you want.

For example: your Book now would look like this 

<a href="your_needed_page_url/?price={{item.cr271_price}}">Book now</a>

So now when the user navigates to that page you will have custom parameter in the url called price. Then you can use next liquid code to get it:

{% assign price = request.params['price']%}

 

----------------------------------------------------
If you find this post helpful consider marking it as a solution to help others find it.

View solution in original post

9 REPLIES 9
ragavanrajan
Super User
Super User

Hi @bishwaroopdey 

 

Can you try using the same liquid tag in your next page also. 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

I can't do it because that line fetches multiple records in a loop. Something like this:

bishwaroopdey_0-1627498998273.png

So when I click on Book Now, it will send the details for that particular option to the next page.

ragavanrajan
Super User
Super User

Hi @bishwaroopdey , 

 

 If you want to retrieve only a single record you can use fetch XML to do this for you. 

 

Example below 

 

<fetch mapping="logical" version="1.0" output-format="xml-platform">
<entity name="cra0d_sm_customermaster">
<attribute name="cra0d_customername" />
<attribute name="cra0d_sm_customermasterid" />
<attribute name="cra0d_contract" />
<attribute name="cra0d_financialyear" />
<attribute name="cra0d_raw_contractname" />
<attribute name="cra0d_customermasterid" />
<filter>
<condition attribute="cra0d_sm_customermasterid" operator="eq" value="d4cc6cda-edc7-eb11-bacc-00224817f106" />
</filter>
</entity>
</fetch>

You can utilise fetchXML and pass dynamic parameters in your condition i.e. guid of that record. 

 

example below

   <filter>
            <condition attribute ="fullname" operator ="eq" value="{{ fieldname| xml_escape }}"/>
            </filter>

Hope it helps. 
------------

If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

 

That's not what I am saying. What I want is something like amazon. In amazon, when you are on the product details page and you click on Buy Now, it takes you to another page for checkout along with the product details like price which is then processed by the payment gateway. That's what I am trying to achieve: Take the details of the product to the next page for checkout.

Hi @bishwaroopdey 

I think we both are in the same context. Create a new page and pass the dynamic ferxhxml I have provided and customise the fields like price, etc exactly like Amazon. 

 

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

That's the question I'm asking, how shall I pass the data from one page to another?

Hi @bishwaroopdey 

 

 Probably a misunderstanding. Please read the solution which I have added with "FetchXML" queries.  Here are the steps for you 

 

1. Create a new page 

2. Add the fetch XML I have provided on the newly added page 

3. Change "attribute" on fetch XML according to your need. Forex: Display price, quantity etc.. 

4. In the same Fetch XML you need to add your "Filter Condition" and that should be dynamic pointing to your guid 

 

Hope it is clear now 

 

Hope it helps. 
------------

If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

Hi @bishwaroopdey,

I assume that your Book now button is a link or something similar. What you can do is add id of the record you would like to pass (or any other identifier that you want) to the url and then use request liquid object (see here - https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/liquid-objects#request) on the new page to get that id or other data that you pass and then fetch whatever you want.

For example: your Book now would look like this 

<a href="your_needed_page_url/?price={{item.cr271_price}}">Book now</a>

So now when the user navigates to that page you will have custom parameter in the url called price. Then you can use next liquid code to get it:

{% assign price = request.params['price']%}

 

----------------------------------------------------
If you find this post helpful consider marking it as a solution to help others find it.

Thanks for the solution. It solved a lot of problems.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Users online (1,382)