Forum Discussion

Benoit_Fournier's avatar
Benoit_Fournier
Iron Contributor
Mar 25, 2019

SharePoint Embed Web Part Syntax

I would like to know what is the syntax to use a parameter from the URL of a page in an embed web part.

 

I used the Page Environment / Query String option in the web part and I didn't find the proper syntax to reach the parameter.

 

For example, if I have a RequestId parameter (.../Test.aspx?RequestId=160), how can I pass that value to the iframe code. I tried [$RequestId] format but it doesn't work.

 

<iframe width="600" height="700" src="https://.../CreateRequest.aspx?TemplateId=[$RequestId]">
</iframe>

 

Thanks.

3 Replies

  • Benoit_Fournier 

     

    I tried this with the list properties web part but couldn't figure it out either. I tried:

    • SitePages/page.aspx?List=PCM&Title=ex1
    • SitePages/page.aspx?ListId={5ac35ce3-8d6b-4c6e-aa06-b968ea31fd09}&Title=ex1
    • SitePages/page.aspx?FilterField1=Title&FilterValue1=ex1&ListId={5ac35ce3-8d6b-4c6e-aa06-b968ea31fd09}
    • SitePages/page.aspx?ListId={5ac35ce3-8d6b-4c6e-aa06-b968ea31fd09}&Id=1

    And a number of variations. The last one just gave the homepage as it's the page with ID = 1 in the SitePages library.

    • Mark Taylor's avatar
      Mark Taylor
      Copper Contributor

      Jeroen Lammens 

       

      Did anyone find out how to do this, as i'm having the same problem - if this worked as it looked like it should do, it would open up so many possibilities within modern sharepoint

      • Jeroen Lammens's avatar
        Jeroen Lammens
        Brass Contributor

        Mark Taylor 

         

        No and don't hold your breath for it. In my tenants, the option page environment is now removed.

        Microsoft showing great form once again.

Resources