Focal Point
[SOLVED] Can I embed a !IBI.FIL in the HTML Composer?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4507094766

February 24, 2014, 03:28 PM
John_Edwards
[SOLVED] Can I embed a !IBI.FIL in the HTML Composer?
I'm trying to be a good boy and play nice with the HTML Composer, but it seems so limited. I wanted to have a string that says "Data Available from 7/1/2012 through 2/8/2104" on the screen where the two dates are pulled from the data source on the fly. I tried calling from a fex and embedding the dates with amper variables and it just said no. So I'm trying to have them in holds so that I can fill them with a !IBI.FIL reference. That's a no-go as well.

Here's the question -- how do you fill text on the fly when you're running in HTML Composer?

J.

This message has been edited. Last edited by: <Kathryn Henning>,



February 24, 2014, 03:57 PM
j.gross
John --

If all else fails, you can make it a one-line report, automatically run at load, aimed at a short, fat iframe.


- Jack Gross
WF through 8.1.05
February 25, 2014, 09:26 AM
John_Edwards
Yeah, that seems to be the operative phrase. "When all else fails." Part of the problem when parachuting in to clients with existing materials is that you have to play be their rules. So I'll need to weasel stuff onto the screen as best I can. Thanks for responding.

J.



February 25, 2014, 09:53 AM
Francis Mariani
Jack's idea is one way to achieve what you need to do.

When I want to play nice (which is getting rarer by the day) this is what I do:

Add a text box and make it hidden. Populate the text box dynamically (internal code or external fex). Then I use JavaScript to write the contents of the hidden text box to wherever I need to on the screen. Alternatively, make the text box not hidden but read-only and use CSS to remove the text box border.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
February 25, 2014, 11:05 AM
Tony A
John,

If you have the fex already then populate your control using a dynamic external procedure.

Say, for instance, I create a fex as follows (just for demonstration purposes) -
DEFINE FILE CAR
  DATA_TEXT/A50 ='Data Available from 7/1/2012 through 2/8/2104';
END
TABLE FILE CAR
  SUM FST.DATA_TEXT
   BY COUNTRY NOPRINT
   BY DATA_TEXT
IF RECORDLIMIT EQ 1
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE PCHOLD FORMAT XML
END

Then in HTML composer, I add a text box (for instance). Click the parameters tab, right click on the control and click "Properties and Settings".
From here I check Dynamic, External Procedure and then click the ellipses to locate and select my fex. Et voila, text box populated with the string I require.

Is this what your requirement is?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
February 26, 2014, 03:05 AM
Dave
J.

We have this in place. Although used for an input field it should work fine with a text-item.

Make the .htm as you please ( let say: inputpage.htm )
Add a text-item ( name it 'infolabel' ).

Then, instead of letting the end-user start a html, let them start a fex. ( let's say starter.fex )


starter.fex
-SET &DYNAMIC_INFOLABEL = 'I am sure you know how to fill this parameter with dynamic text :-)';

-HTMLFORM app/inputpage.htm

-HTMLFORM BEGIN
<SCRIPT LANGUAGE='JSCRIPT'>
document.getElementById('infolabel' ).value = '!IBI.AMP.DYNAMIC_INFOLABEL;';
</SCRIPT>
-HTMLFORM END


We use this to allow a end-user to select an item from a list.
With a drill the user is send to an html-input-page. The selected item in the list is 'entered' in a inputbox in a form and even to automatically click the 'run' button. ( document.getElementById('form1Submit').click(); )


_____________________
WF: 8.0.0.9 > going 8.2.0.5
February 26, 2014, 04:48 AM
George Patton
I think Tony is on the right track, except that John presumably wants the from and to dates to be dynamic. So a little bit of additional pre-processing will be required to get those values, convert them to a string and then concatenate them into the text required.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP
February 26, 2014, 09:24 AM
John_Edwards
I like that. A couple of tags wrapped around the target location lets me drop bits and pieces into a string of text without too much trouble. A little different from what I'm used to but likely more versatile.

I'll be honest -- I've scrapped the existing Composer stuff in favor of a cleaner html interface that lets me customize as I see fit. (I just couldn't get the calendars to work in a useful, dependable way.) But the concept still stands regardless of the source of the target page.

J.