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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     multi-select technique

Read-Only Read-Only Topic
Go
Search
Notify
Tools
multi-select technique
 Login/Join
 
Member
posted
I have seen this code and used it to handle multi-selects but I am not sure why or how it works! (but it does) Big Grin

-IF &SOMEINPUTFIELD.EXISTS EQ FOC_NONE OR ' ' THEN GOTO NEXT10;
WHERE SOMEDATAFIELD EQ &SOMEINPUTFIELD.(OR(1,2)).;
-*
-NEXT10

What I haven't found documented anywhere is the syntax .(OR(1,2)).

Can anyone tell me what it is doing and/or where its documented? Obviously, I snipped it from somebody else.

Thanks!
 
Posts: 23 | Location: Daytona Beach, FL | Registered: February 07, 2005Report This Post
<JG>
posted
gypsy try Developing Reporting Applications Version 5 Release 3 (DN4500578.0904) page 312
 
Report This Post
Member
posted Hide Post
Yes, this is halfway there...but I am still guessing about:

.(OR(1,2))

if anyone knows why I wouldn't put 1, 10 for example that would be helpful.

Thanks!
 
Posts: 23 | Location: Daytona Beach, FL | Registered: February 07, 2005Report This Post
<JG>
posted
the 1,2 are the choices that a user will see in the dropdown box.
You would put there what you wanted to offer the user as valid selections such chalk,cheese
 
Report This Post
Guru
posted Hide Post
That code is for amper-auto prompting, giving a drop-down list with "1" and "2" in it.
 
Posts: 391 | Location: California | Registered: April 14, 2003Report This Post
Virtuoso
posted Hide Post
I read the documentation, and I'm a little bit puzzled.

The "Amper Auto-Prompting in CGI Servlet" topic (http://documentation.informationbuilders.com/masterinde...vapps/codingui10.htm) gives syntax for four varieties of Select prompting.

Static Single-Select List of Values:
'&variable.(value,value2[,value3]...).[description.]'

Dynamic Single-Select List of Values:
'&variable.(FIND fieldname IN datasource).[description.]'

Static Multi-Select List of Values:
&variable.({AND|OR}(value1,value2,...valueN)).[description].

Dynamic Multi-Select List of Values:
&variable.({AND|OR}(FIND fieldname IN datasource)).[description].

So adding AND( ), or OR( ), turns a single select into a multi-select.

But is there a difference between AND and OR? Are they synonyms in this context?
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
<JG>
posted
Not surprised that your confused because it�s not explained
.
From a multi-select point of view AND does not work when EQ is chosen as the test.

A WHERE statement like WHERE ( COUNTRY EQ 'JAPAN' AND 'ENGLAND' ); is totally wrong unless you always want to select zero records.

However a statement like WHERE ( COUNTRY OMITS 'JAPAN' OR 'ENGLAND' ); is valid.

You�ve just got to use the correct logic.
 
Report This Post
Virtuoso
posted Hide Post
I am quite aware of how to deal with IF or WHERE clauses in a TABLE request.

My question is with ergard to the extensions to traditional autoprompt syntax when Dialog Manager variables appear in Focus statements: is there a semantic difference between
&foo.(OR(a,b,c)).Choose your FOOs.
and
&foo.(AND(a,b,c)).Choose your FOOs.
?
Other questions:

- Does the -DEFAULT feature apply to "multiple" selects, or only "singles".

- How does execution proceed? Clearly the agent must first parse the fex, recognize that there is auto-prompt syntax, and return a form. Since agents operate nonpersistently, the form has to re-invoke the fex upon submit. How does the second call make it clear that it is not a first call? How is the context preserved and restored (e.g., if the fex was originally called with some &vars set; or if there are && global vars set)?

- Note that autoprompt occurs even for &vars with -DEFAULT values supplied -- even though, in traditional Focus and WebFocus fex execution, they would not be considered undefined.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
<JG>
posted
I did not mean to imply that you did not understand standard logic. I merely wanted to give a fuller explanation for those who have less understanding of what we are talking about.

The semantic difference for OR/AND is purely the operand that you choose.

The wrong one, it does not work the correct one and it does.

Execution is very simple,

The first request is EX FEX

The second request is EX FEX var1=xx,var2=yy

WebFocus Knows that when variables have a value it does not need to prompt for them.

You can test this by creating a report with an auto prompt but supply the required variable name and value on the input line in a browser.
Supply the value and it will not ask you for it.

Auto prompt when enabled disables �DEFAULT, because Auto prompt means give me a value. Personally I think that this is wrong and it should say if you haven�t given me a value I�ll use the �DEFAULT instead. Perhaps an NFR is required.
 
Report This Post
Virtuoso
posted Hide Post
[qb] WebFocus Knows that when variables have a value it does not need to prompt for them.[/qb]

A -SET value, as distinct from a -DEFAULT one. (They are distinguishable.) As I noted, that varies from traditional autoprompting rules.

[qb]...
Auto prompt when enabled disables �DEFAULT...[/qb]

I didn't see that in the cited document for self-service apps. In fact, I didn't see any way to turn autoprompt off. -- By its nature it would have to be a DM directive, since this all happens before -RUN.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     multi-select technique

Copyright © 1996-2020 Information Builders