Home

SharePoint Embed Web Part Syntax

%3CLINGO-SUB%20id%3D%22lingo-sub-388388%22%20slang%3D%22en-US%22%3ESharePoint%20Embed%20Web%20Part%20Syntax%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-388388%22%20slang%3D%22en-US%22%3E%3CP%3EI%20would%20like%20to%20know%20what%20is%20the%20syntax%20to%20use%20a%20parameter%20from%20the%20URL%20of%20a%20page%20in%20an%20embed%20web%20part.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20used%20the%20Page%20Environment%20%2F%20Query%20String%20option%20in%20the%20web%20part%20and%20I%20didn't%20find%20the%20proper%20syntax%20to%20reach%20the%20parameter.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20example%2C%20if%20I%20have%20a%20RequestId%20parameter%20(...%2FTest.aspx%3FRequestId%3D160)%2C%20how%20can%20I%20pass%20that%20value%20to%20the%20iframe%20code.%20I%20tried%20%5B%24RequestId%5D%20format%20but%20it%20doesn't%20work.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CIFRAME%20width%3D%22%26quot%3B600%26quot%3B%22%20height%3D%22%26quot%3B700%26quot%3B%22%20src%3D%22%26quot%3Bhttps%3A%2F%2F...%2FCreateRequest.aspx%3FTemplateId%3D%5B%24RequestId%5D%26quot%3B%22%3E%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bgt%3B%3C%2FIFRAME%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-388388%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-426995%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Embed%20Web%20Part%20Syntax%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-426995%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F26583%22%20target%3D%22_blank%22%3E%40Benoit%20Fournier%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20this%20with%20the%20list%20properties%20web%20part%20but%20couldn't%20figure%20it%20out%20either.%20I%20tried%3A%3C%2FP%3E%3CDIV%3E%3CUL%3E%3CLI%3ESitePages%2Fpage.aspx%3FList%3DPCM%26amp%3BTitle%3Dex1%3C%2FLI%3E%3CLI%3ESitePages%2Fpage.aspx%3FListId%3D%7B5ac35ce3-8d6b-4c6e-aa06-b968ea31fd09%7D%26amp%3BTitle%3Dex1%3C%2FLI%3E%3CLI%3ESitePages%2Fpage.aspx%3FFilterField1%3DTitle%26amp%3BFilterValue1%3Dex1%26amp%3BListId%3D%7B5ac35ce3-8d6b-4c6e-aa06-b968ea31fd09%7D%3C%2FLI%3E%3CLI%3ESitePages%2Fpage.aspx%3FListId%3D%7B5ac35ce3-8d6b-4c6e-aa06-b968ea31fd09%7D%26amp%3BId%3D1%3C%2FLI%3E%3C%2FUL%3E%3CP%3EAnd%20a%20number%20of%20variations.%20The%20last%20one%20just%20gave%20the%20homepage%20as%20it's%20the%20page%20with%20ID%20%3D%201%20in%20the%20SitePages%20library.%3C%2FP%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-562298%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Embed%20Web%20Part%20Syntax%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-562298%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F75442%22%20target%3D%22_blank%22%3E%40Jeroen%20Lammens%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDid%20anyone%20find%20out%20how%20to%20do%20this%2C%20as%20i'm%20having%20the%20same%20problem%20-%20if%20this%20worked%20as%20it%20looked%20like%20it%20should%20do%2C%20it%20would%20open%20up%20so%20many%20possibilities%20within%20modern%20sharepoint%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-569868%22%20slang%3D%22en-US%22%3ERe%3A%20SharePoint%20Embed%20Web%20Part%20Syntax%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-569868%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F38392%22%20target%3D%22_blank%22%3E%40Mark%20Taylor%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENo%20and%20don't%20hold%20your%20breath%20for%20it.%20In%20my%20tenants%2C%20the%20option%20page%20environment%20is%20now%20removed.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EMicrosoft%20showing%20great%20form%20once%20again.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Benoit Fournier
Contributor

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.

@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

@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.

Related Conversations
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
30 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
7 Replies