Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 28 FEB 2002 03:54:44PM b cameron wrote:

1) In another multivalue system I can create an item in the MD (say VOC?) called LineCount and in attribute put a 'NI'.

This will return the number of the item being processed and display in the output. (i.e. 1 2 3 4).

How would I recreate this type of item (what table? through the editor/tablebuilder? etc?) so that it would be available for any

table in an RLIST statement?

2) what is the 'defacto' standard (aka - works everytime) with regard to DATE selections in an RLIST statement. I constantly have to test and retest to get the 'surest' results.

For example…

WITH DATE GE "01/01/01" AND LE "12/31/01"

WITH DATE=010101 AND LE 123101

WITH DATE EQ 010101 AND DATE LE 123101

WITH DATE EQ '010101' AND DATE LE '123101' etc.

3) and along with that the RLIST seems to have trouble with more than 2 criteria. What's up with that!! Has this always been this way?

what are others doing if passing criteria to a popup in popval that

has more than 2. I don't get the proper results! Do I need to jump though hoops here or am I missing something?

TIA


At 28 FEB 2002 04:34PM [url=http://www.sprezzatura.com" onMouseOver=window.status=Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote:

Create a symbolic dictionary item in another file called say COUNTER with a formula of @Ans=@RecCount, then copy this into SYSDICT. This should do for 1.

For 2 it's best to use BETWEEN ExtDate1 and ExtDate2.

For 3 - please post what you're actually doing? There should be no such restriction.

The Sprezzatura Group

World Leaders in all things RevSoft


At 28 FEB 2002 04:59PM b cameron wrote:

1) thanks will do

2) what about the quotes double or single and delims "/" "-" " "?

3) SELECT tablename BY BRANCH BY DATE WITH BRANCH EQ "A" AND WITH DATE GE 010101 AND LE 010102 AND WITH STATUS EQ "O" "R"

for example.

Thanks!


At 28 FEB 2002 05:09PM b cameron wrote:

I created the linecnt item and copied it into sysdict.

It works great if I LIST tablename LINECNT

But when doing

-

rlist('SELECT table WITH … BY …",5,,)

If @reccount then

 slist('LIST table WITH STATUS EQ "X" LINECNT ....')

End

-

I do not get the linecnt to display unless I put LINECNT LINECNT

and if it does display it returns the same number for each line..

Syntax problems??


At 28 FEB 2002 07:57PM Matt Sorrell wrote:

SELECT tablename BY BRANCH BY DATE WITH BRANCH EQ "A" AND WITH DATE GE 010101 AND LE 010102 AND WITH STATUS EQ "O" "R"

I think this should be constructed like this:

SELECT tablename BY BRANCH BY DATE WITH BRANCH EQ "A" AND WITH DATE GE 010101 AND LE 010102 AND (WITH STATUS EQ "O" OR WITH STATUS EQ "R")

Since you don't have parentheses in there, it could be parsing incorrectly and doing a whole series of ANDs, and then the simple OR at the end. I've seen this behaviour before in ARev.

When in doubt, use full syntax and parens so as to force the intended behaviour.

HTH,

msorrel@greyhound.com

Greyhound Lines, Inc.


At 28 FEB 2002 08:44PM b cameron wrote:

I'm often in doubt with RLIST in OI.

I have managed to have sucess with the parens

but then in other instances it is not.


At 01 MAR 2002 07:53AM Oystein Reigem wrote:

If I was in any doubt at all I'd bracket the query to the max and make every single WITH clause explicit like

( WITH BRANCH EQ "A" )

AND

( ( WITH DATE GE 010101 ) AND ( WITH DATE LE 010102 ) )

AND

( ( WITH STATUS EQ "O" ) OR ( WITH STATUS EQ "R" ) )

Brackets don't cost anything, do they?

But for all I know

( WITH STATUS EQ "O" ) OR ( WITH STATUS EQ "R" )

needs more processing than

( WITH STATUS EQ "O" "R" )

?

(Aaron is the guy who could tell, of course.)

- Oystein -


At 01 MAR 2002 01:45PM Richard Guise wrote:

This discussion seems to have moved into the problem our users have had ever since the early days of Arev with the implicit "OR" syntax - e.g. WITH HAIR=GREY" AND WITH EYES=RED" "BLACK" "BLOODSHOT"

Your average user (entirely understandably) puts in instinctive brackets so as to read WITH HAIR=GREY" AND (WITH EYES=RED" "BLACK" "BLOODSHOT") - but Arev & OI don't. One can try to explain the Boolean rules again and again to users but to no avail.

I suppose in Arev one could put in a command line pre-processor to put brackets in automatically. In OI my "to do" list definitely includes doing this for our T-List report writer when it calls RList for SELECTs. I think this will save both hours of fruitless explanation and frequent erroneous (but technically correct) reports.


At 01 MAR 2002 05:44PM b cameron wrote:

Richard,

Thanks.

Coming from the Pick/MV world we/I could always do

LIST/SELECT/SORT filename WITH "XX" "XX"

AND WITH attrname "X" "Y" "Z"

AND WITH attrname "X" "Y" "Z"

AND WITH attrname "X" "Y" "Z"

AND WITH attrname "X" "Y" "Z"

OR WITH attrname # "A" AND # "B"

The only rule was on the NE (#) you needed the second AND and so on

(which is more boolean to me). In the early days only dbl quotes

around the data values (single quotes reserved for item ids only and never with a connective AND, OR, WITH, IF).

With dates it was WITH DATE GE "XX XX XX" AND LE "XX XX XX" strictly.

Therefore no confusion so I am trying to find out the stead fast rules and stick to them for all I do…


At 05 MAR 2002 10:46PM Robert Lee wrote:

Rightly or wrongly, I wrote a routine called MY_RLIST which breaks the complex line into lots of easy ones that RLIST can handle. Seems to work for me. You can have it if it helps.

COMPILE SUBROUTINE MY_RLIST(CMD, TARGET, P1, P2, P3)

Declare Function Utility, Msg, Get_Property

Declare Subroutine Msg, Set_Property

Parent=Get_Property(@window, 'MDIFRAME')

IF Parent=' THEN Parent=@window

XCRLF =CHAR(10) : CHAR(13)

old=Utility("CURSOR", 'H')

mess='

mess=Please wait … Filtering Selections' : XCRLF

mess:= 'This may take a few moments.'

mess=U' ;* Message displayed but doesn't wait for a response

Msgup=Msg(@window, mess)

SWAP 'ID-SUPP' WITH IN CMD ;* SWAP '(' WITH IN CMD

SWAP ')' WITH IN CMD BY.POS=INDEX(CMD, 'BY ', 1) WITH.POS=INDEX(CMD, 'WITH ', 1) IF WITH.POS=0 THEN WITH.POS=LEN(CMD) + 1 IF BY.POS=0 THEN BY.POS=LEN(CMD) + 1 IF BY.POS )

FOR I=1 TO NO.WITHS + 1

IF I <= NO.WITHS THEN
	SET_PROPERTY(Parent : '.STATUSLINE_3', 'TEXT', @RECCOUNT)
	SET_PROPERTY(Parent : '.STATUSLINE_1', 'TEXT', 'Filtering - Level ' : I)
	CALL RLIST(CMD.CLAUSE : ' ' : CMD.WITH.CLAUSE[i], 5, '', '', '')
END ELSE
	SET_PROPERTY(Parent : '.STATUSLINE_1', 'TEXT', 'Sorting Rows...')
	SET_PROPERTY(Parent : '.STATUSLINE_3', 'TEXT', @RECCOUNT)
	CALL RLIST(CMD.CLAUSE : ' ' : CMD.BY.CLAUSE, 5, '','','')
END

NEXT I

SET_PROPERTY(Parent : '.STATUSLINE_1', 'TEXT', 'Processing…')

SET_PROPERTY(Parent : '.STATUSLINE_3', 'TEXT', @RECCOUNT)

old=Utility("CURSOR", 'H')

Msg(Parent, Msgup) ;* Take down the message

RETURN 0

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/9f6eea81e9f10d1788256b6e0072dfe6.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1