Page 1 of 1

field as parameter in html control

Posted: 03 Jul 2017
by haasha
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

Re: field as parameter in html control

Posted: 03 Jul 2017
by Nikita Kurguzov
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