{{tag>category:"OpenInsight Specific"}}
[[https://www.revelation.com/|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]]
==== EZ-way to get name of ID control? (OpenInsight Specific) ====
=== At 04 JUN 2000 11:38:12PM Ray Chan wrote: ===
Just curious, but is there an easy way to get the name of the control that holds the Key or ID value for a record? I see that there is an "ID" event, but that returns the value of the key. I want the name of the control.
Thanks,
rayc@symmetryinfo.com onmouseover=window.status=imagine ... ;return(true)"
[url=http://www.symmetryinfo.Com" onMouseOver=window.status=Imagine ... ' ;return(true)]Symmetry Info[/url]
Ray Chan ~ Symmetry Info
----
=== At 05 JUN 2000 01:07AM Don Bakke wrote: ===
Ray,
Here is a routine we wrote in SYSPROG to be universally. Use in good health:
Compile function Get_Key_Controls(Window)
************************************************************************************************
*
* Name : Get_Key_Controls
*
* Description: Returns a list of key controls for the window
*
* Notes :
*
* Parameters
* Window in -- The window needing the FOCUS change
* KeyList out -- @FM delimited list of key controls sorted in PART order
*
* History (Date, Initials, Notes)
* 09/11/99 dmb Original programmer
*
************************************************************************************************
$insert APP_INSERTS
Declare subroutine V119
* Get list of all controls
CtrlList=Get_Property(Window, "CTRLMAP")
Convert @FM to @RM in CtrlList
* Get field positions of all controls
PosList=Get_Property(CtrlList, Str("POS":@RM, Count(CtrlList, @RM)):"POS")
* Build list of keys
KeyList="
Loop
Locate "0" in PosList using @RM Setting Pos else Pos=0
While Pos
KeyList := Field(CtrlList, @RM, Pos):@RM
PosList=Field(PosList, @RM, Pos+1, 999)
CtrlList=Field(CtrlList, @RM, Pos+1, 999)
Repeat
KeyList-1, 1="
NumKeyCtrls=Count(KeyList, @RM) + (KeyList NE "")
If NumKeyCtrls GT 1 then
Props=Str("PART":@RM, NumKeyCtrls-1):"PART"
Parts=Get_Property(KeyList, Props)
Convert @RM to @FM in KeyList
Convert @RM to @FM in Parts
Work="
For Loop=1 to NumKeyCtrls
Work := Parts:@FM:KeyList:@RM
Next Loop
V119("S", "", "A", "R", Work, "")
For Loop=1 to NumKeyCtrls
KeyList=Field(Work, @RM, Loop)
Next Loop
end
Return KeyList
dbakke@srpcs.com
[url=http://www.srpcs.com]SRP Computer Solutions[/url]
[img]http://www.srpcs.com/srpicon1.gif[/img]
----
=== At 05 JUN 2000 01:10AM Richard Hunt wrote: ===
One easy example is in the HELP chapter 4 (properties). Under the "POS", there just happens to be an example of what you are looking to do. Check it out and see if that is what you want.
----
=== At 05 JUN 2000 01:24AM rayc@symmetryinfo.com wrote: ===
The Don,
Thanks so much for the snippet of your code. I shall use it to preserve my good health .
rayc@symmetryinfo.com onmouseover=window.status=imagine ... ;return(true)"
[url=http://www.symmetryinfo.Com" onMouseOver=window.status=Imagine ... ' ;return(true)]Symmetry Info[/url]
Ray Chan ~ Symmetry Info
----
=== At 05 JUN 2000 01:26AM rayc@symmetryinfo.com wrote: ===
Richard,
Appreciate the reference. I'm learning something new everyday .
Thanks,
rayc@symmetryinfo.com onmouseover=window.status=imagine ... ;return(true)"
[url=http://www.symmetryinfo.Com" onMouseOver=window.status=Imagine ... ' ;return(true)]Symmetry Info[/url]
Ray Chan ~ Symmetry Info
----
=== At 05 JUN 2000 03:44AM Oystein Reigem wrote: ===
Ray,
Are you sure it wasn't a slip of the pen and what Don really meant was that he [i]wrote[/i] it in good [i]faith[/i]? :-)
- Oystein -
----
=== At 05 JUN 2000 02:15PM rayc@symmetryinfo.com wrote: ===
Oystein,
[i]Are you sure it wasn't a slip of the pen and what Don really meant was that he wrote it in good faith? [/i]
At this point in my life, my understanding of faith is slight. It is [b]hope[/b] that I have more contact with as in [i]"god I [u]hope[/u] I can get this conversion done.[/i].
But with the help of you guys, I do have [b]faith[/b]...I guess,;-)
rayc@symmetryinfo.com onmouseover=window.status=imagine ... ;return(true)"
[url=http://www.symmetryinfo.Com" onMouseOver=window.status=Imagine ... ' ;return(true)]Symmetry Info[/url]
Ray Chan ~ Symmetry Info
----
=== At 05 JUN 2000 05:59PM [url=http://www.sprezzatura.com" onMouseOver=window.status=Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote: ===
Or just look at the KeyMap@ labelled common window variable (see SENL [i]passim[/i]).
[url=http://www.sprezzatura.com" ]The Sprezzatura Group[/url]
[i]World Leaders in all things RevSoft[/i]
[img]http://www.sprezzatura.com/zz.gif[/img]
----
=== At 05 JUN 2000 09:09PM rayc@symmetryinfo.com wrote: ===
Mr. SprezzGroup,
Thanks for the info on KeyMap@. Went to your website. Using the search engine, I found reference to KeyMap@ in V1-I9 of your publication. Very cool, easy, fast, and useful. I am posting a snippet of the code for others to see. Using KeyMap@ is very nice.
--- Sprezz sample code on using Keymap --
[b]
(* make sure you define winId before $insert oiwin_comm_init)
winId=ctrlEntId1,'.'
$insert oiwin_comm_init
*Determine the key controls
keyCount=count( keyMap@, @FM) + ( keyMap@ NULL$)
keyControls=NULL$[/b]
----
Thanks again. Hey when are we going to see another Revmedia!?!
rayc@symmetryinfo.com onmouseover=window.status=imagine ... ;return(true)"
[url=http://www.symmetryinfo.Com" onMouseOver=window.status=Imagine ... ' ;return(true)]Symmetry Info[/url]
Ray Chan ~ Symmetry Info
----
=== At 05 JUN 2000 09:58PM Don Bakke wrote: ===
Ray,
Note that with OIWIN_COMM_INIT you still have to parse out the actual control name from the array. Also, the second part of our code sorts the controls by key part.
We used to use OIWIN_COMM_INIT a lot (thanks to Sprezz's pioneering) but we preferred to include the insert in our generic application wide insert statement. We soon discovered that if you have one insert embedded in another you soon lose the ability to debug your code line by line accurately.
dbakke@srpcs.com
[url=http://www.srpcs.com]SRP Computer Solutions[/url]
[img]http://www.srpcs.com/srpicon1.gif[/img]
----
=== At 06 JUN 2000 12:54AM rayc@symmetryinfo.com wrote: ===
"The Don"
[i]Note that with OIWIN_COMM_INIT you still have to parse out the actual control name from the array.[/i]
Yes, I see that it returns a three part vm delimited variable. I see that is the ControlName; is the class type. What is ? Just curious.
[i]We used to use OIWIN_COMM_INIT a lot (thanks to Sprezz's pioneering) but we preferred to include the insert in our generic application wide insert statement. We soon discovered that if you have one insert embedded in another you soon lose the ability to debug your code line by line accurately.[/i]
Valid point (not that I have to worry about debugging.). However, for me and other, it's good to know other alternatives as in KeyMap@. It's like a magic pill. I can see that if you had a multipart key that the code you provide will pick that up. Again, just curious, do you know if [u]KeyMap@[/u] will properly pickup the controls related to multipart key and would they be delimited with @FM?
Cheerio and thanks a bunch.
rayc@symmetryinfo.com onmouseover=window.status=imagine ... ;return(true)"
[url=http://www.symmetryinfo.Com" onMouseOver=window.status=Imagine ... ' ;return(true)]Symmetry Info[/url]
Ray Chan ~ Symmetry Info
----
=== At 06 JUN 2000 11:00AM [url=http://www.sprezzatura.com" onMouseOver=window.status=Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote: ===
We've been a little too busy on internal projects to do an SENL for a while. All we seem to be doing is MAJOR web projects at the moment. We've got some pretty cool technologies - especially for AREV users. So all of the other projects (32 bit file open dialogs, Win200 style revParamerizer, next SENL etc etc etc) have all gone on a back burner. Add in training our new recruits (PERL expertise is great but RBasic is a tad more useful at present) and introducing new management processes and time is a little short.
This also explains the lack of postings here - we only have time to monitor the main forum now and even then we only post infrequently. Sorry .
[url=http://www.sprezzatura.com" ]The Sprezzatura Group[/url]
[i]World Leaders in all things RevSoft[/i]
[img]http://www.sprezzatura.com/zz.gif[/img]
----
=== At 06 JUN 2000 11:37AM rayc@symmetryinfo.com wrote: ===
Mr. Sprezz,
[i]This also explains the lack of postings here - we only have time to monitor the main forum now and even then we only post infrequently. Sorry .[/i]
Well, you got to do what you got to do! Glad to hear you got some neat AREV projects going on, but sorry to see that you're too busy to do a REVMedia soon. As I am now reading them now , sorry, I find them to be filled with useful tips and hints on using OI. [b](I would advise any new OI developers get your hands on them. They are Great!)[/b] And yea, we have notice and missed your presence on this forum.
No need to apologize. Heck RTI doesn't. Wasn't there a movie where they said "love means you don't have to say sorry."
Well, keep up the good work and thanks for all your help.
Tally ho, and onward with OI,
rayc@symmetryinfo.com onmouseover=window.status=imagine ... ;return(true)"
[url=http://www.symmetryinfo.Com" onMouseOver=window.status=Imagine ... ' ;return(true)]Symmetry Info[/url]
Ray Chan ~ Symmetry Info
[[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=478C398E72A86652852568F50013FA72|View this thread on the forum...]]