field as parameter in html control

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
haasha
Posts: 4
Joined: Sun Apr 17, 2016

03 Jul 2017

Hi

I want to embeed an external chart of a BI tool in a spform.

I can easily embeed the chart with the HTM control , with this code

<iframe src='https://<myserver>/single/?appid=f5509295-9cbf-47f5-9293-b8beec171fbb&obj=cUALBn&opt=nointeraction&select=clearall&select=Contract%20ID,41151173' style='border:none;'></iframe>

But of course I don't want the same chart for all items, so I need the control gets the value of the parameter (SAPContract%20ID) from the field "SAPContractID' in the form.

My first try has been this

<iframe width=500 height=500 src='https://<myserver>/single/?appid=f5509295-9cbf-47f5-9293-b8beec171fbb&obj=cUALBn&opt=nointeraction&select=clearall&select' + field('SAPContractID') + ' style='border:none;'></iframe>

but it does not work... :(

How should I do it?

Thanks

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

03 Jul 2017

Try running this:

Code: Select all

<iframe width=500 height=500 src='https://<myserver>/single/?appid=f5509295-9cbf-47f5-9293-b8beec171fbb&obj=cUALBn&opt=nointeraction&select=clearall&select' + fd.field('SAPContractID').value() + ' style='border:none;'></iframe>
It should work as long as there is SAPContractID in the form with appropriate value.

Here is a lot more data on getting and setting SharePoint form field values, check it out: https://spform.com/javascript-framework ... eld-values
Cheers

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests