Presentation is loading. Please wait.

Presentation is loading. Please wait.

Supercharge Your Parameterized HTML Launch Pages With 7.6.9+ Advanced Chaining Techniques! Dan Pinault Power Systems Research Copyright 2010, Information.

Similar presentations


Presentation on theme: "Supercharge Your Parameterized HTML Launch Pages With 7.6.9+ Advanced Chaining Techniques! Dan Pinault Power Systems Research Copyright 2010, Information."— Presentation transcript:

1 Supercharge Your Parameterized HTML Launch Pages With Advanced Chaining Techniques! Dan Pinault Power Systems Research Copyright 2010, Information Builders. Slide 1

2 Basic Chaining in HTML Composer Copyright 2010, Information Builders. Slide 2

3 What is Chaining?  A method of selectively reducing the number of options in ‘downstream’ controls based on selections made in ‘upstream’ controls.  Typically used with data fields that have a hierarchical or one- to-many relationship (does not imply data file structure)  Prevents users from making selections that will not return any data [i.e. (Region EQ ‘Central Asia’) and (Country EQ ‘United States’)] Copyright 2010, Information Builders. Slide 3

4 Simple Chaining HTML Composer Design Screen Copyright 2010, Information Builders. Slide 4

5 Simple Chaining HTML Composer Parameters Screen Copyright 2010, Information Builders. Slide 5

6 Simple Chaining Run Time Example Copyright 2010, Information Builders. Slide 6

7 The Problem Copyright 2010, Information Builders. Slide 7

8 Long Lists Can Cause Issues Copyright 2010, Information Builders. Slide 8

9 The “Aha!” moment Copyright 2007, Information Builders. Slide 9

10 Advanced chaining technique – Step1 Copyright 2007, Information Builders. Slide 10 This drop-down list allows the user to select one of the Master Files they have access to.

11 Step1 – Parameters Tab – Data Source Selector Copyright 2007, Information Builders. Slide 11

12 Let’s take a closer look – Data Source Selector -* Code to populate combobox1 Data Source Dropdown List control. -* Use value of &&IBI_IF_FILE to create list of available Master Files. -* Need to evaluate &&IBI_IF_FILE before TABLE Request because Dialog -* Manager command -INCLUDE can not evaluate variable inside TABLE Request. -SET &FILELIST = '-INCLUDE ' | &&IBI_IF_FILE; TABLE FILE SYSTABLE SUM FST.REMARKS BY NAME &FILELIST.EVAL ON TABLE PCHOLD FORMAT XML END Copyright 2007, Information Builders. Slide 12

13 Advanced chaining technique – Step2 Copyright 2007, Information Builders. Slide 13 The values in this drop-down list are determined by the Master File selected in the Data Source Selector.

14 Step2 – Parameters Tab –Field Name Selector Copyright 2007, Information Builders. Slide 14

15 Let’s take a closer look – Field Name Selector -* Code to populate combobox2 Field Name Dropdown List control. -* Default Amper-Variables because list will populate when HTML page loads. -DEFAULT &DATASOURCE = SUMMIT2010DATA; CHECK FILE &DATASOURCE HOLD AS DS_HLD TABLEF FILE DS_HLD SUM FST.TITLE BY FIELDNAME ON TABLE PCHOLD FORMAT XML END Copyright 2007, Information Builders. Slide 15

16 Advanced chaining technique – Step3 Copyright 2007, Information Builders. Slide 16 The values in this list-box are determined by the selected item in the Field Name Selector.

17 Step3 – Parameters Tab – Data Value Selector Copyright 2007, Information Builders. Slide 17

18 Let’s take a closer look – Data Value Selector -* Code to populate listbox1 Data Values List control. -* Set ASNAMES on to allow for custom data field and display field. SET ASNAMES = ON -* Default Amper-Variables because list will populate when HTML page loads. -DEFAULT &DATASOURCE = SUMMIT2010DATA; -DEFAULT &FIELDNAME = REGIONNAME; TABLE FILE &DATASOURCE SUM FST.&FIELDNAME AS FIELDVALS BY &FIELDNAME AS FIELDVALS ON TABLE PCHOLD FORMAT XML END Copyright 2007, Information Builders. Slide 18

19 Advanced chaining technique – Step4 Copyright 2007, Information Builders. Slide 19 Adding the Guide Words Selector allows the user to ‘page’ through a long list of Data Values in the Data Value Selector.

20 Step4 – Parameters Tab – Guide Words Selector Copyright 2007, Information Builders. Slide 20

21 Let’s take a closer look – Guide Words Selector (1 of 3) -* Code to populate combobox3 Guide Words Dropdown List control -* Default Amper-Variables because list will populate when HTML page loads. -DEFAULT &DATASOURCE=SUMMIT2010DATA; -DEFAULT &FIELDNAME=REGIONNAME; -DEFAULT &BLOCKSIZE=500; -DEFAULT &BLOCK=0; -* First pass assigns each row to a block number based on the value of &BLOCKSIZE. TABLE FILE &DATASOURCE SUM COMPUTE ROWNUM/I7 = LAST ROWNUM-(-1); COMPUTE BLOCK /I5 = 1-(-(INT((ROWNUM-1)/&BLOCKSIZE))); BY &FIELDNAME WHERE &FIELDNAME IS NOT MISSING; ON TABLE HOLD AS FOCCACHE/HOLDKEYS END -RUN Copyright 2007, Information Builders. Slide 21

22 Let’s take a closer look – Guide Words Selector (2 of 3) -* Second pass is to get the format of the selected field so we can determine how -* to convert the values to a string format so the values can be concatenated. CHECK FILE &DATASOURCE HOLD AS DS_HLD TABLE FILE DS_HLD SUM FST.FORMAT WHERE FIELDNAME EQ '&FIELDNAME'; ON TABLE SAVE END -RUN -* Put the field format value into &FIELDTYPE and convert field value to string. -READ SAVE &FLDTYPE.A8. -SET &FLDINIT = EDIT(&FLDTYPE,'9$'); -SET &XFIELD = - IF (&FLDINIT EQ 'I') THEN 'EDIT(&FIELDNAME.EVAL)' - ELSE IF (&FLDINIT EQ 'P') THEN 'PTOA(&FIELDNAME.EVAL, ''(&FLDTYPE.EVAL)'', ''A99V'')' - ELSE IF (&FLDINIT EQ 'D' OR 'F') THEN 'FTOA(&FIELDNAME.EVAL, ''(&FLDTYPE.EVAL)'', ''A99V'')' - ELSE '&FIELDNAME.EVAL'; Copyright 2007, Information Builders. Slide 22

23 Let’s take a closer look – Guide Words Selector (3 of 3) -* Remove leading zeros if they exist. DEFINE FILE FOCCACHE/HOLDKEYS FLDNAM/A99V = (TRIMV('L', &XFIELD, 99, '0', 98, 'A99V')); END TABLEF FILE FOCCACHE/HOLDKEYS SUM FST.ROWNUM AS LOROW NOPRINT LST.ROWNUM AS HIROW NOPRINT -* Build Guide Words entry from first and last FLDNAM in each block. COMPUTE RANGE/A99V = IF (LST.ROWNUM GT FST.ROWNUM) THEN FST.FLDNAM || ' ~ ' | LST.FLDNAM ELSE FST.FLDNAM; BY BLOCK ON TABLE SET HOLDLIST PRINTONLY AND ASNAMES ON ON TABLE PCHOLD FORMAT XML END Copyright 2007, Information Builders. Slide 23

24 Let’s take a closer look – Data Value Selector (v2) -* Code to populate listbox1 Data Values List control when used with Guide Words control. -* Set ASNAMES on to allow for custom data field and display field. SET ASNAMES = ON -* Default Amper-Variables because list will populate when HTML page loads. -DEFAULT &FIELDNAME = REGIONNAME; -DEFAULT &BLOCK = 1; TABLEF FILE FOCCACHE/HOLDKEYS SUM FST.&FIELDNAME AS FIELDVALS BY &FIELDNAME AS FIELDVALS WHERE BLOCK EQ █ ON TABLE PCHOLD FORMAT XML END Copyright 2007, Information Builders. Slide 24

25 Putting it all together – A Real-World Example (1 of 2) Copyright 2007, Information Builders. Slide 25

26 Putting it all together – A Real-World Example (2 of 2) Copyright 2007, Information Builders. Slide 26

27 Questions? Copyright 2007, Information Builders. Slide 27 Dan Pinault


Download ppt "Supercharge Your Parameterized HTML Launch Pages With 7.6.9+ Advanced Chaining Techniques! Dan Pinault Power Systems Research Copyright 2010, Information."

Similar presentations


Ads by Google