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.
In the good old days (read v5 or earlier), a self-respecting multi select would produce: &COUNTRY0 &COUNTRY1 &COUNTRY2 but the new HTML thing in DevStu doesn't yield a form, it yields xml and creates a single statement: WHERE &COUNTRY EQ 'ENGLAND' OR 'FRANCE' Well, that's not what we want. We want to loop thru the choices, doing an included (or EXEC'd) fex once for each value. So, how do we do that now??? Anybody pulled their hair out over this one yet<This message has been edited. Last edited by: susannah,
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Parse the input amper variable and, using a REPEAT, substring the variable using the OR as a delimiter. Then you can index each variable and do your loop.
I might be able to find some code but won't have time till later on this afternoon. You can send me a personal email (like you did before) and I'll try to find it for you.
That's the work around we had come up with our own sweet selves . thanks, Ginny, for confirming. i don't like having to do this... I may try replacing the .htm with a diy with a regular FORM tag set.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Danny, are you saying that we DO have the choice? Can you point me to the thing in the gui where you pick? Frankie, that's right. NO MORE FORMS. its really awful.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
oops i forgot why i came back.... Ginny, would you be kind enough to send me your script if you can locate it? i'm having ageda turning what gets returned into a character string, even. 'ENGLAND' OR 'FRANCE' is the returned string and i can't get that into a variable to POSIT thru. (too much nashville fun, i guess) -SET &MYVAR = ?? i can't seem to get the '''''''' right.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
but Danny, you don't have the option to do that. the xml returns exactly 'ENGLAND' OR 'FRANCE' Jack, i'ld been trying CTRAN,POSIT, and SUBSTR.. GETTOK seemed to require that i know how many OR's i had..which i dont. aprioris all ok. Danny, numeric values are actually easier. argh.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
note: there is a big difference between ARGLEN and &var.LENGTH. big... huge...major. and there's a difference in how you get the output size attribute into a SUBSTR phrase.. which is why i say 'don't mess with this'... this is AGONY... I need a nap.This message has been edited. Last edited by: susannah,
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Very nice. I understood that you wanted to have as in previous versions a list of &variables. This is what my DM gives you. Well, if not for this app, the for another. Cheers!
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
Are you using amper autoprompting? If not then check the OPERATION attribute of your multiselect. Even back as far as 5.2 (I think) you could change this value to OR to give you what you are now seeing. The default used to be NONE but as I don't (yet?) use 7.6.5 I couldn't tell you if this has changed.
Email me your HTML if you wish to.
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, 2004
T, don't quite understand... i'll build something on car and send. Do you have access to 5n? anywhere? Can you 'Publish' me a form from MRE and email it to me so i can get all the funky hidden vars? i want to see if i can make a FORM still work. FrankieM has 5n... i'll ask him ..in a while...
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
In the good old days (read v5 or earlier), a self-respecting multi select would produce: &COUNTRY0 &COUNTRY1 &COUNTRY2 but the new HTML thing in DevStu . . . creates a single statement: WHERE &COUNTRY EQ 'ENGLAND' OR 'FRANCE'
Actually, the fex has: WHERE COUNTRY EQ &COUNTRY.yada.yada. (COUNTRY being the database fieldname, &COUNTRY a DM var to be replaced with COUNTRY values) and after the pre-scan and autoprompt process are done the fex executes for real, with a behind-the-scenes equivalent of EX ... COUNTRY='''ENGLAND'' OR ''FRANCE''' to pre-SET the DM variable. -- such that the WHERE line (after Dialog Mgr substitution for &COUNTRY) resolves to
WHERE COUNTRY EQ 'ENGLAND' OR 'FRANCE'
I agree with Susannah -- the &COUNTRY0=2 &COUNTRY1='ENGLAND' &COUNTRY2='FRANCE' thing was a kludge, but the genii is out of the bottle and it's usefull to have the values.
So (MODEST PROPOSAL) WHY NOT HAVE AUTOPROMPT PROVIDE BOTH
To wit, after the multi-select, set both the combined and individual values behind the scenes:
EX ... COUNTRY='''ENGLAND'' OR ''FRANCE''', COUNTRY0=2, COUNTRY1='ENGLAND', COUNTRY2='FRANCE'
If your fex is built to simply run off the resolved value of &COUNTRY, the extra vars do no harm. But if you need to process the individual values, you've got them.
Two caveats -- neither of them a show-stopper IMO:
1. When the user selects just one value we need special handling: OR(...) returns a quoted string in &COUNTRY, whereas the traditional forms return just an unquoted string (the client, in the traditional scenario, being unaware that the source was a multiple select). But if we arrange for the fex to have &COUNTRY0 : 1 &COUNTRY1 : ENGLAND &COUNTRY : 'ENGLAND' good old code will still work, provided it gives the presence of &var0 precedence over the presence of &var.
2. There are cases where this change in behavior may break a fex, so I guess this behavior would have to be a switchable option.
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
IT GETS WORSE that solution i wrote above only works in 761 it fails in 764, 765. its the SUBSTR function something screwed up has happened to it. argh. oh no never mind, i fixed my the errant substring function last parm...its me that isn't working in 76n
Jack, i recall there was some universe in which &COUNTRY was synonymous iwth &COUNTRY1This message has been edited. Last edited by: susannah,
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
An HTML form with a multi SELECT returns the (0, 1 or more) values you select, each attached to the unadorned NAME appearing as an attribute of the select structure. Thus, if you select just ENGLAND, the GET would have ?COUNTRY=ENGLAND -- while for England and France it would have ?COUNTRY=ENGLAND&COUNTRY=FRANCE
WF client, when it sees two or more identical names, converts them into a series of unique names (so they can become separate DM &vars) by appending integers, topping off the list with a counter variable with 0 appended.
BUT, if the JavaScript that WF 7.x generates would cast the values into that series form even when there is only one selection, in addition to generating the strung-together-and-quoted form under the unadorned name, you would have the best of both.
If fex senses that &COUNTRY exists, but &COUNTRY0 also exists, and &COUNTRY0 happens to be 1, you'd perform the same -REPEAT loop as you would for 2 or more, and your logic would terminate the loop after 1.
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
There's tons of javascript there -- both generic functions pulled in from the library, and specific (to the particular prompts) code generated inline in the page. It's perfectly possible for IBI to craft js functions that will do as I described -- serializing the NAMEs so they are all unique (var var0=N var1 var2 ... &varN) before Client sees them, and the values will all flow to the fex as correspondingly-named DM vars.
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
lo and behold i figured this out: 1) if you use HTML painter, you get a single compound WHERE statement WHERE COUNTRY EQ 'ENGLAND' OR 'FRANCE' OR 'BURKINA FASO' 2) if you go to MRE, and use PUBLISH, you get a regular FORM (well, sort of). You clean out all the .js gibberish, write your own
you THEN get &MYCOUNTRY0, &MYCOUNTRY1, etc SO.. If your launch page needs individual variables, so you can loop, you gotta use PUBLISH from MRE, or hand-write your own gibberish-free launch pages. Whew. World still on its axis. At least until after the election.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003