Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
dropdown trouble
 Login/Join
 
Member
posted
I like to do a HTML Form from Layout HTML with drop down, these chain one by one.... To fill first and that this fills the second and and thus consecutively

Can anyone help me??
Thank a lot!!!!
Regards
 
Posts: 28 | Registered: January 12, 2006Report This Post
Master
posted Hide Post
Take a look on this link,

https://forums.informationbuilders.com/eve/forums/a/...951098431#1951098431

hope this helps


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Expert
posted Hide Post
Alanocturna (or shall we call you Mr Lobito?)

Chaining drop downs within resource layout painter is fairly easy to achieve, you just select the drop downs one by one (in order) and then click on the "chain" icon on the bottom control bar. Make sure that the small number icons attached to each combo box is in the required order.

I will add more to this explanation when I get home tonight as I have a written small text file that explains how the ibirls.js module dynamically builds the SELECT boxes within your HTML page.

Hold tight and watch this space!!

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 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
Alanocturna,

As I mentioned above, chaining drop downs within resource layout painter is fairly easy to achieve, you just select the drop downs one by one (in order) and then click on the "chain" icon on the bottom control bar.

Understanding how they work via the ibirls.js JavaScript module is something a little harder to follow and something that most Forum members have probably not ventured far into.

To understand how the JS works you must first understand that, although there are "standard" attributes for various HTML tags, you can actually define your own. For instance - Most tags normally have "name" and "id" associated with them, together with "style" etc. but IB use extras such as "operation", "datafield", "dispfield", "datasource" and so on.

Each one of these has a particular use within the JS and understanding each could help us all to achieve greater results within our UIs.

Here are some of the useful ones and what they mean (roughly) from a SELECT tag -

name
  • This is used as the variable name internally within your Fex.

    elementname
  • Used by the JS to identify groups of tag types so that a loop through document.all is not required.

    elementtype
  • Similar to elementname.

    addalloption
  • Set to "1" to add an option to you select box for everything or "0" to not .....

    dynalldisplayvalue
  • If "addalloption" is set to "1" then this is displayed in the select as the displayed text.

    inchainindex
  • If not set to "-1" then this indicates the order (and priority) within the chain that the select will be populated.

    chainnumber
  • The number of the chain within which this tag belongs.

    displayfield
  • When the datasource is "typeMas" this depicts the field (column) that is used to populate the displayed values within the option list.

    datafield
  • When the datasource is "typeMas" this depicts the field (column) that is used to populate the data values within the option list.

    numofrecords
  • You can use this to restrict the number of records returned when populating the select boxes. Just think of it as supplying a value for RECORDLIMIT (which is exactly how it is used (lol).

    sourcetype
  • The type of the data source from which the data will be derived. "typeMas" for a master file description, "typeFex" for a Fex. When using a fex, the output must be "PCHOLD FORMAT XML".

    datasource
  • The data source item, for "typeMas" this must be a master file description, or a Fex for "typeFex". The value must represent an existing file within the APP Path.

    ##### This one is very useful #####
    operation
  • Normally set to "NONE" but can be "AND" or "OR" and controls the way the variables are added to the form execution line for multiple selects. Using "NONE" gives the more common suffixed variables such as &Car, &Car0, &Car1, &Car2 etc. but using one of the other values will produce your single variable with the value "value OR value OR value....." thereby negating the requirement to interpret the multiple variables into an IN list etc.

    datafieldtype
  • Set to "INTIGER" if your variable is numeric e.g. (1 OR 2 OR 3 ....) or "CHAR" if alphanumeric e.g. ('1' OR '2' OR '3' ....).

    IBIC_server
  • I bet that you will never guess this!! (lol)

    IBIAPP_app
  • Yet another conumdrum for you to guess the usage of!! (rofl)

    ##########################

    (edited as I noticed a mistake)

    One thing to remember is that each subsequent chain member must use an MFD that contains the field used in the "datafield" attribute from all the first chain member. This is because the XML that is built to populate the combo box is derived by building an AdHoc fex along the lines of (i.e. for chain member 5) -

    TABLE FILE filename
    SUM FST.displayfield[5]
    BY datafield[5]
    WHERE datafield[0] EQ datafield[0].value
    ON TABLE PCHOLD FORMAT XML
    END

    As far as I can tell the chaining is not supported when using "typeFex" (except when as the first member of the chain)? Unless anyone else knows different? Guess what, I have been corrected - Thanks Robert!!!

    Hope this helps some of you.

    T

    p.s. As I find that some of my comments are wrong (Frowner) then I will edit this post accordingly.

    This message has been edited. Last edited by: Tony A,



    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 
  •  
    Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
    Expert
    posted Hide Post
    Ok, a small expansion on the above, using the same example (i.e. 6 chained combo boxes - 0 to 5 - with the ALL option on each combo). This applies when datasource="typeMas".

    When you change the selection on chain member 0, each subsequent member will be changed as follows -

    TABLE FILE filename
    SUM FST.displayfield[n]
    BY datafield[n]
    WHERE datafield[0] EQ datafield[0].value
    ON TABLE PCHOLD FORMAT XML
    END

    Where [n] is 1 through 5 for each chain member.

    When you change the selection on chain member 1 (onwards), each subsequent member will be changed as follows -

    TABLE FILE filename
    SUM FST.displayfield[n]
    BY datafield[n]
    WHERE datafield[0] EQ datafield[0].value
    AND datafield[1] EQ datafield[1].value
    ON TABLE PCHOLD FORMAT XML
    END

    Where [n] is 2 through 5 for each chain member.

    If you do not set the ALL option on each combo, then the subsequent extracts will include a selection on each of the preceding combo box value -

    TABLE FILE filename
    SUM FST.displayfield[3]
    BY datafield[3]
    WHERE datafield[0] EQ datafield[0].value
    AND datafield[1] EQ datafield[1].value
    AND datafield[2] EQ datafield[2].value
    ON TABLE PCHOLD FORMAT XML
    END

    Well, hopefully that will be slightly clearer than mud?

    T

    This message has been edited. Last edited by: Tony A,



    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 
     
    Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
    Member
    posted Hide Post
    Thanks a lot and OK I am Mr Lobito Tony!!!!

    Regards!!!
     
    Posts: 28 | Registered: January 12, 2006Report This Post
      Powered by Social Strata  

    Read-Only Read-Only Topic


    Copyright © 1996-2020 Information Builders