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 18 OCT 2001 12:27:26PM a becker wrote:

I want to select, via an rlist, only those entries that have a match on a date entered by the user.

The date on file I'm comparing is multi value and each entry has a different date.

Currently I have: (the statements in the script are correct, however,I may have typos in the following statements.)

CALL RLIST(SELECT NSF_MST WITH ENTRY_MOD_DATE=10/15/2001' BY AGT_NO,4,"DDA_LIST":@STATION,"","")

P=REPOSITORY("EXECUTE",ENTID(@APPID,"OIREPORT","RDLAYOUT","NEWDDA.RPT"),"/ED=1")

The reporter has the necessary coding in it to process the selected records.

It works fine, however, this selects all the entries not just those with the matching date. If a record has 5 entries and one of the entries match the date, all 5 entries are selected. I only want to select those entries that have the matching date, not all of them.

I know that if I'm reading the file and use Readnext, value and that will only select the matching entries, but, how do I do it with an rlist?

Is there a way to select only those entries that match the date??

I tried using EVERY but that only gave me those that had only one entry. After thinking about it, I realize that that is what it should do.

Thanks for your help.

Andy

IL State Lottery


At 18 OCT 2001 12:49PM [url=http://www.sprezzatura.com" onMouseOver=window.status=Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote:

Have you tried the LIMIT clause to Limit the display to the matching values?

The Sprezzatura Group

World Leaders in all things RevSoft


At 18 OCT 2001 01:40PM Don Miller - C3 Inc. wrote:

The problem is that LIMIT doesn't work on a SELECT and I'm not sure that REPORTER may not handle it properly. There's a work-around you might try:

In your program, get the desired date and ICONV it. Set @USERn to hold that variable. Make a DICT symbolic called USER_DATE that looks line:

IF @USERn THEN

LOCATE @USERn in @RECORD SETTING POS THEN @ANS=@RECORD
END ELSE @ANS='

END ELSE @ANS='

Then SELECT YOURFILE WITH USER_DATE=whatever input'

and use this field in your report. It will be single-valued. I've used this same idea with AMV's when they need to be aligned.

Set @USERn=Date, @USERn=Other Criteria then

LOCATE @USERn IN @RECORD SETTING POS THEN
  IF @RECORD=@USERn then
    @ANS=@RECORD
  END ELSE @ANS='
END ELSE @ANS='

This guarantees that the two fields meet the criteria selected.

HTH

Don Miller

C3 Inc.


At 18 OCT 2001 02:54PM Victor Engel wrote:

If I understand what you're trying to do, this can be accomplished using two select statements. The first one should sort by the mv field. This will expand the select to include the values. The second iteration will use the value included from the first select and so will only consider that value.

I hope that was clear.


At 18 OCT 2001 02:57PM Victor Engel wrote:

In other words, first do a

SELECT NSF_MST BY AGT_NO

Then, with that list active, do this:

SELECT NSF_MST WITH ENTRY_MOD_DATE=10/15/2001'


At 19 OCT 2001 08:40AM Don Miller - C3 Inc. wrote:

Victor ..

You might be surprised to find out that in OI the 2'nd select may not work. The first one will provide a set of keys delim'd by an @VM and then an @FM. The second select will effectively remove the @VM from the first one. That's why I use the symbolic I posted earlier.

Don M.


At 19 OCT 2001 09:38AM Victor Engel wrote:

Teach me to reply to an OI thread ….


At 19 OCT 2001 10:47AM Don Miller - C3 Inc. wrote:

Victor (or is it still Vector?) ..

Sometimes you bite the bear .. sometimes the bear bites you. Still good to see that you're hangin' round.

Don


At 19 OCT 2001 02:40PM a becker wrote:

Don

I tried your DICT symbolic and maybe I misunderstood something.

I put the symbolic in the master record and now when I run the program it does not execute reporter at all. If I change it back to the original date check, it works.

Also where does the 2nd part of your coding belong?

BTW - the only mv field is the date, the agent number is not MV.

Thanks

Andy

View this thread on the forum...

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