Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 09 AUG 2022 08:54:43PM Robert Heard wrote:

In a window, I want to perform a SELECT and make this list active in the window.

I am able to use code 'X' and command "SELECT file WITH field = " But these are not presented in the window. I notice that if I exit the window and re-enter, the list of records is now an active list in that window. How do I tell the window that there is a new list of keys to use? Would like to avoid writing a subroutine to do this. Hope that is easily done via Code/Commands. Thanks, Robert. </QUOTE> —- === At 09 AUG 2022 09:05PM Donald Bakke wrote: === <QUOTE> <QUOTE>In a window, I want to perform a SELECT and make this list active in the window. I am able to use code 'X' and command "SELECT file WITH field = "

But these are not presented in the window.

I notice that if I exit the window and re-enter, the list of records is now an active list in that window.

How do I tell the window that there is a new list of keys to use? Would like to avoid writing a subroutine to do this. Hope that is easily done via Code/Commands.

Thanks,

Robert.

I think the standard solution is to resolve the selection and store the @FM delimited list of Keys into the WC_BROWSE_NEXT% Window Common. Then set WC_NEW_BROWSE% to 1 and WC_RESET% to RESET_PROMPT$ (4).

Don Bakke

SRP Computer Solutions, Inc.

</QUOTE>


At 10 AUG 2022 03:20AM Robert Heard wrote:

Thanks Don. I know how to do this in a subroutine. I was wanting to avoid writing another.

I did manage to stumble on a quirky way to present the active list. On the key prompt, onthe "Options" hook, I use Code="K" and Command is {Alt-I}. This will now show the keys in that window. I then press <F9>, and the records are available to the Window.

I just thought, I could use a multi Code/Command (separated by ";"), as "X;K" and Command as "SELECT file WITH field = ; {Alt-I}{F9} –> NOPE. Didn't work. Just tried it. I could see the "Browse Edit" window was blank. Curious. But the <F2> key on the key prompt did work. Guess I will have to play with this some more. Robert. </QUOTE> —- === At 10 AUG 2022 09:48AM Donald Bakke wrote: === <QUOTE> <QUOTE>Thanks Don. I know how to do this in a subroutine. I was wanting to avoid writing another. I did manage to stumble on a quirky way to present the active list. On the key prompt, onthe "Options" hook, I use Code="K" and Command is {Alt-I}. This will now show the keys in that window. I then press <F9>, and the records are available to the Window. I just thought, I could use a multi Code/Command (separated by ";"), as "X;K" and Command as "SELECT file WITH field = ; {Alt-I}{F9}

–> NOPE. Didn't work. Just tried it. I could see the "Browse Edit" window was blank. Curious. But the <F2> key on the key prompt did work.

Guess I will have to play with this some more.

Robert.

I see. I thought this started out as a coded solution. I'm not entirely sure how to approach this strictly using Code/Command. Does emulating {F8} do anything?

Don Bakke

SRP Computer Solutions, Inc.

</QUOTE>


At 10 AUG 2022 03:42PM Aaron Kaplan wrote:

Thanks Don. I know how to do this in a subroutine. I was wanting to avoid writing another.

I did manage to stumble on a quirky way to present the active list. On the key prompt, onthe "Options" hook, I use Code="K" and Command is {Alt-I}. This will now show the keys in that window. I then press <F9>, and the records are available to the Window.

I just thought, I could use a multi Code/Command (separated by ";"), as "X;K" and Command as "SELECT file WITH field = ; {Alt-I}{F9} –> NOPE. Didn't work. Just tried it. I could see the "Browse Edit" window was blank. Curious. But the <F2> key on the key prompt did work. Guess I will have to play with this some more. Robert.</QUOTE> A window will load a browse list If one is active, so a X;W should work, unless you're trying to load this into the current window. But the original window will remain open a TCL level back. You'll have to write some code The Sprezzatura Group The Sprezzatura Blog World leaders in all things RevSoft </QUOTE> —- === At 10 AUG 2022 07:11PM Robert Heard wrote: === <QUOTE>The subject on this log says that I want to perform a SELECT via a SOFTKEY. I note with interest, that using <Ctrl>+<F10> will perform a SELECT (or GETLIST, or FILTER), and present this select list to the current window, and the window DOES see and use the new select list. So I know it CAN be done, just don't know how this "undocumented feature" works. Robert. </QUOTE> —- === At 10 AUG 2022 09:21PM Donald Bakke wrote: === <QUOTE> <QUOTE>The subject on this log says that I want to perform a SELECT via a SOFTKEY. I note with interest, that using <Ctrl>+<F10> will perform a SELECT (or GETLIST, or FILTER), and present this select list to the current window, and the window DOES see and use the new select list. So I know it CAN be done, just don't know how this "undocumented feature" works. Robert.</QUOTE> What makes you think this isn't being done in code? Don Bakke SRP Computer Solutions, Inc. </QUOTE> —- === At 11 AUG 2022 11:40AM Aaron Kaplan wrote: === <QUOTE> <QUOTE>The subject on this log says that I want to perform a SELECT via a SOFTKEY. I note with interest, that using <Ctrl>+<F10> will perform a SELECT (or GETLIST, or FILTER), and present this select list to the current window, and the window DOES see and use the new select list. So I know it CAN be done, just don't know how this "undocumented feature" works. Robert.</QUOTE> It can be done. You hit CTRL-F10. There's no direct call to this function. In the end, once all of these things are called, the internal code set the window common vars like originally posted. There's no undocumented feature for this. There is no feature at all. Unless you do your little hack of forcing keystrokes into the input buffer, there is no catalyst call nor system function that you can pass a select statement and have it load the browse list in a single simple call. You have to write 5 or 6 lines of code. The Sprezzatura Group The Sprezzatura Blog World leaders in all things RevSoft </QUOTE> —- === At 14 AUG 2022 10:26PM Robert Heard wrote: === <QUOTE>… and the solution is: Here is code on Softkey SF4: SF4]Select bugs without "Fix" date]C]$INSERT UTILITY_PROGS,AREV.COMMON & PERFORM "SSELECT CAPS.BUGS WITH DATE.FIXED = " & @BROWSE.LIST= & DONE=0 & LOOP & READNEXT ID ELSE DONE=1 & UNTIL DONE DO & @BROWSE.LIST<1,-1>=ID & REPEAT & NEW.BROWSE=1 & BROWSE.NEXT=@BROWSE.LIST & RESET=5 Robert. </QUOTE> —- === At 14 AUG 2022 10:54PM Robert Heard wrote: === <QUOTE>Apparently the "Normal" font size is a little bigger than I thought! Ha! I had selected "… and the solution is:" and from the Font drop down, selected "Normal", which showed the HTML code as size=100 . Robert. </QUOTE> —- === At 16 AUG 2022 01:56PM Aaron Kaplan wrote: === <QUOTE> <QUOTE>… and the solution is: Here is code on Softkey SF4: SF4]Select bugs without "Fix" date]C]$INSERT UTILITY_PROGS,AREV.COMMON & PERFORM "SSELECT CAPS.BUGS WITH DATE.FIXED = " & @BROWSE.LIST=''

& DONE=0 & LOOP & READNEXT ID ELSE DONE=1 & UNTIL DONE DO

& @BROWSE.LIST<1,-1>=ID & REPEAT & NEW.BROWSE=1 & BROWSE.NEXT=@BROWSE.LIST

& RESET=5

Robert.

I absolutely have to know, so against my better judgement I need to ask you why using a catalyst C call is better than just putting it into a small program called with a catalyst S call?

The Sprezzatura Group

The Sprezzatura Blog

World leaders in all things RevSoft


At 16 AUG 2022 07:13PM Robert Heard wrote:

Although this is "against your better judgement", I will answer this quite reasonable question.

It started from the initial requirement of simply using Code="X" and Command="SELECT …". But although the select worked, and I could see that there was an active select list, I thought it a simple progression to get them to appear in the window. This was also based on the fact that by pressing <Ctrl>+<F10> would successfully do this desired process, I wanted to see if I could also do it.

It also opens the door to doing other things where I might want to port a common function to other applications without the need to catalog a routine there: It is all contained within the definition of a window.

Hope this satisfies your curiosity.

Robert.


At 16 AUG 2022 08:06PM Donald Bakke wrote:

It also opens the door to doing other things where I might want to port a common function to other applications without the need to catalog a routine there: It is all contained within the definition of a window.

So at the end of the day you just wanted a portable solution without the baggage of a separate stored procedure. I see the appeal in it but I might find myself cursing the original developer if I had to go back and support this.

FWIW, you wouldn't need to catalog the routine. You can always call it directly from the table.

Don Bakke

SRP Computer Solutions, Inc.


At 16 AUG 2022 09:21PM Robert Heard wrote:

What do you mean to "call it directly from the table"?

Robert.


At 16 AUG 2022 10:23PM Donald Bakke wrote:

What do you mean to "call it directly from the table"?

Robert.

Code: X

Command: RUN <table where object code exists> <name of program>

Don Bakke

SRP Computer Solutions, Inc.

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/ece93f855ba9dc4fbcc4e50deab8f670.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1