Jump to content
  • 0

Create a passed parameter in Report (List and Tabular) - Please This is the last thing I need in order to complete my application...


Lynda

Question

I am hoping that someone can help.

Situation:

I have a One to Many Parent-Child Table relationships. (1 Recipe has 0/n Instructions and 0/n Ingredients) I need to put all of this on one web page/lightbox.  Because each of these are individual tables, the only thing they have in common is the parent ID, RecipeID.

My Host provider(WIX) doesn't support passed parameter, thus the parameter that I am passing ([@RecipeID] is being passed from PageA, but not received by PageB. If you use WIX's simple tables and not a third party like Caspio, then they provide a rudementary interface. I have not been able to find the source of this in order to mimic the structure of the link.

So... My next thought is...

I know that in Report data pages, fields are not provided the opportunity to be passed as parameters. I am working with both Report - List and Report - Tabular pages.

What I thought I could try is to insert an HTML block or a Calc field and somehow create a passed parameter. The thought being that if I couldn't pass the parameter to the web page, I could pass the parameter to the four data page controls on the page.

I just don't know how. 

I have looked through all the documentation, but have found nothing.

Any help or suggestions would be appreciated.

 

Lynda

 

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Hi @Lynda,

I tried recreating your setup and I was able to create a workaround to load the information on the second Data Page by deploying it inside the Details page of the List DataPage. Here are the steps I did:

1. I enabled the Details page in the List DataPage.

2. On the Details Page, I added an HTML block.

3. I deployed the Report DataPage in the HTML block using the iframe deployment method and added the ID from table A on the URL, so it can be received by the Report DataPage.

image.png.a6867fb73972a0ade723d105aa5c194c.png

 

Here is the link to the sample DataPage with the applied solution:

https://c2dcp398.caspio.com/dp/02dbb0003b81e38a12cf4d0f8b69

 

I'm not really sure if that is your desired output since you are also working on WIX which I still don't have any experience using it. But I hope this helps!

Link to comment
Share on other sites

  • 0

Thank you Kronos, but that is not exactly what I need. I have created a couple of diagrams that might better explain my situation:

image.thumb.png.88fd9486f2fbdbda0a6b01d56e4a5e88.png

The Problem:

  1. My Host provider(WIX) doesn't support passed parameter or iframe from external embedded code.  We found this out the hard way as I tried to pass the RecipeID. It left the MyRecipes web page just find, but was never received by the destination web page RecipeDetails.
  2. Because RecipeSupportByNutrient is a tabular report, parameters on individual fields are not available to be passed.

Current Situation:

Right now, the WIX page: MyRecipes and the Caspio data page RecipeSupportByNutrient work, except for the Recipe Details link.

The Caspio data page RecipeSupportByNutrient is based on the the Recipes table which is keyed by RecipeID.

Possible Solutions:

  1. Pass a parameter ([@RecipeID]) and hope that my data pages can pick it up when I open another web page. (I DON'T KNOW HOW TO CREATE A PARAMETER OUT OF THIN AIR)
  2. Update an Authentication field and and then pick up the parameter from there.

The end result should look something like this:

image.png.91ce93d06472f557b38d676e9e5abf02.png

All ideas welcome.

 

Lynda

 

 

 

Link to comment
Share on other sites

  • 0

Right now this is my HTML:

<a href="https://www.mydietmadereal.com/mdmr/RecipeDetails[@app:sysRelease]RecipeID=[@field:RecipeID]" target="_top">Get the Recipe</a>

It passes the ID, but the RecipeDetail web page does NOT receive it, hence why I need to pass it as a parameter [@RecipeID]

 

Lynda

Link to comment
Share on other sites

  • 0

Hi @Lynda

I don't know all of the inner specifics of Wix, but from what I have tested so far, it seems possible to accept parameters from the Wix URL and pass them onto respective embedded Caspio DataPages with JavaScript if you have Wix JavaScript embed widget. This widget seems to be available for paid accounts only, so I could not test this approach in full.
The idea can be summarized as follows:

1. On the parent page (report DataPage), we create a link to the child page (the Wix page with multiple embedded Caspio DataPages). The link you shared above should do the job.
Here is my parent webpage on wix: https://caspiowixtesting.wixsite.com/my-site
It has the embedded report page with a link that opens the child page and passes respective ID parameters. 
This is how my link looks inside HTML box of Caspio report page: 

<a href="https://caspiowixtesting.wixsite.com/my-site/child-page-receives-external-parameter?id=[@field:ID]" target="_blank">Get to the details page</a>



This is a Wix page with deployed Caspio report page:

parentpageonwix.thumb.png.dd588c66a3c2a8a3cb2096eb275f3dcf.png


2. Once we open a link, we get something like https://caspiowixtesting.wixsite.com/my-site/child-page-receives-external-parameter?id=YFMWS3IJ

3. On Child Wix page, with multiple embedded Caspio pages, we need to grab the query string from the URL (it is ?id=YFMWS3IJ in the example above) and add it to the source of respective iframes.
For this purpose, we need to add JavaScript to the Child Wix page:

const customizeIframeSources = () => {

    document.querySelectorAll('iframe').forEach(iframe => {
     iframe.src += `?${window.location.href.split('?')[1]}`
    })
}

document.addEventListener('DOMContentLoaded', customizeIframeSources)

image.thumb.png.abe97357a6627f621499b026d145d940.png

4. Your child DataPages must receive an external parameter value on load in respective places for this workaround to work:

image.png.bafdb1e8b3ec90f92ec10ecbf9bf4749.png


This approach should work, but since I do not have a paid account to test how this JavaScript would behave on Wix, some additional things might need to be added to JavaScript due to Wix specifics. 

Let me know if that helped

parent page on wix.png

Link to comment
Share on other sites

  • 0

OK... I have hope. 

I have stepped through this, but I think I am doing something wrong.

The URL produced from my Parent WIX Web page is: https://www.mydietmadereal.com/mdmr/RecipeDetails?siteRevision=369&RecipeID=97065941

siteRevision is temporary and used for the test environment. Ultimately it will go away. I can always change the code when I go live:

I added the code to the WIX RecipeDetail page through WIX's developer tool VELO. Not sure where the code was put in the stack. In any case, I have not been able to get it to work. I inpect the page, and the ID has not been passed to the iFrame (Caspio data page).

I understand what you are doing.  I just need to know where (and how) did you insert the code?

I hope I am not being too difficult. I REALLY appreciate you for all your effort.

Lynda

image.thumb.png.6cf3b55d324a2893a1a38cacce835e96.png

image.thumb.png.fe4440e59af76145e44ae4454eaffe04.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...