Focal Point
[Closed] MultiSelect (OR) Prompting, Can You Confirm this?

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

June 12, 2014, 08:45 AM
RobertF
[Closed] MultiSelect (OR) Prompting, Can You Confirm this?
1) Can someone confirm this for version 7703.
2) Anyone know of a work around?
3) Is this fixed in version 8.

Situation:
Create a fex with a SINGLE value prompt for a string data type. Apply WHERE condition using the parameter. Can you confirm that you must put single quotes around the amper parameter used in the WHERE condition. It only seems to work in this manner. Example:

-SET &SPECIALTY = &IDXSPECIALTY.(FIND TBL_VAR.TBL_VAR.IDXSPECIALTY,TBL_VAR.TBL_VAR.IDXSPECIALTY IN TBL_VAR).Select Specialty;
.
.
.
WHERE TBL_VAR.TBL_VAR.IDXSPECIALTY EQ '&IDXSPECIALTY';


Please confirm that if you change the prompt to a multi select (OR) now you must go into the WHERE statement and REMOVE the single quotes around the amper parameter since the multi select (OR) appears to add a set of quotes itself. Failure to do so yeilds two sets of single quotes and an error.


Is there a way around this?

This message has been edited. Last edited by: Tamra,


WebFOCUS 8206.08
Windows, All Outputs
June 12, 2014, 09:27 AM
Tony A
Hi Robert,

I think this might be a case of expecting the text editor to autocomplete your syntax? Wink

Liken it to using a function where the last parameter is normally the format or the field to which the result is placed. e.g. NEWFIELD/A4 = GETTOK(SOURCE_FIELD, 255, 1, ' ', 4, 'A4'); If you changed the A4 to the field name would you expect the quotes to be removed for you - or vice versa? Ok, not exactly the same but you get my point?

If you create your filter through the GUI then you will see that, for a single select, quotes are placed around the variable filter e.g. '&COUNTRY.(FIND CAR.ORIGIN.COUNTRY IN CAR).COUNTRY:.'

However, when changing that to a multi select OR then the quotes are removed e.g. &COUNTRY.(OR(FIND CAR.ORIGIN.COUNTRY IN CAR)).COUNTRY:.

I would venture the argument that, if you wish to manually code then you have to follow the correct rules as you are responsible for using the correct syntax.

So -
1) I would expect that to be the case.
2) Yes, if you change the operation then expect to have to use the correct syntax.
3) It is working correctly.

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 
June 12, 2014, 11:11 AM
Anatess
That's how it's always been.

Interestingly, the HTML Layout Composer now has the option to have or not have quotes around multi-select values, so it's great for when you want to choose whether to treat them as numeric/alpha or when you want to use it for other stuff besides a WHERE condition.

(Didn't notice this in 7.6.4, I don't think it was an option then).


WF 8.1.05 Windows
June 12, 2014, 01:01 PM
Francis Mariani
quote:
a case of expecting the text editor to autocomplete your syntax?

My copy of EditPlus can do that.


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
June 16, 2014, 11:29 AM
RobertF
****CLOSED


WebFOCUS 8206.08
Windows, All Outputs