[[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]]
==== Comparing @Record with ORec (OpenInsight Specific) ====
=== At 18 JUN 1999 03:22:55PM Dan Manning wrote: ===
{{tag>"OpenInsight Specific"}}
Read a recent listing from Don Bakke suggesting the saving of @Record to a user-defined property in the form on the Read event. During the Write event, the user-defined property can be access to get ORec and the Record property to get a current @Record.
Method worked fine except for the edit tables. My form is stuffing empty rows into the end of my edit tables. Even though no data has been changed from ORec to @Record, the Write event sees them as being different because of the extraneous @VM's.
Is there a method, short of stripping the @VM's myself, to get rid of the excess baggage?
----
=== At 22 JUN 1999 10:29AM Don Miller - C3 Inc. wrote: ===
Dan..
OI has a nasty habit of populating dbtables with null MV entries to the extent of the size of the array on the form. This has caused mo no end of grief in the past. I do something like this:
*
* CLEAN UP ANY BLANK LINES IN TABLES
*
LINES=GET_PROPERTY(@WINDOW:".DBTABLE_1","ARRAY") ;* SKILLS
COUNT=COUNT(LINES,@VM)+(LINES # "")
FKNT=COUNT(LINES,@FM)+1
LOOP
UNTIL COUNT=0 OR LEN(LINES)
COUNT-=1
REPEAT
* TRIM BLANKS OUT
FOR I=1 TO FKNT
LINES[i]=FIELD(LINES[i],@VM,1,COUNT)
NEXT I
SET_PROPERTY(@WINDOW:".DBTABLE_1","ARRAY",LINES)
...
Hope this helps
Don Miller
C3 Inc.
----
=== At 22 JUN 1999 10:49AM dsig@teleport.com wrote: ===
To add to this briefly ..
In the write event,
Ctrls=Get_Property(@Window,CtrlMap$)
CtrlCnt=Count(Ctrls,@fm) + (Ctrls # Null$)
For CtrlPntr=1 to CtrlCnt
Type=Get_Property(@Window:".":Ctrls,Type$)
If Type=EDITTABLE" THEN
... do don's stuff
End
Next CtrlPntr
This way you don't have to hard code what controls you will process ..
dsig@teleport.com onmouseover=window.status=imagine ... a world where ceos dont have hissy-fits with your clients;return(true)"
David Tod Sigafoos ~ SigSolutions
voice: 503-639-8080
----
=== At 22 JUN 1999 11:29AM Don Bakke wrote: ===
To further DSig's suggestion, put all of this in a promoted WRITE event and you have one solution for all forms.
----
=== At 22 JUN 1999 02:11PM Dan Manning wrote: ===
Don:
What is a promoted Write event? Is it like a pre-write or a write-replace in ARev?
Thanks.
----
=== At 22 JUN 1999 02:33PM dsig@teleport.com wrote: ===
Dan,
A promoted event (i called it global .. probably why I can't play with the other kids :-) is routine which you place in the event chain ... hummm not quite right.
Anyway .. say you have a section of code that you want to always happen without having to put the source in each screen. An example would be my got/lost focus events or Don's Write event. This way when ever you create a screen the event will work for you automatically.
You can make them application specific or form specific etc.
There are some great threads on doing this so do a search on 'promoted' and see what comes up. I think that cameron wrote a great answer sometime last year .. or maybe it was donB ..
Anyway do a search and if you can't find anything repost and someone will reply
dsig@teleport.com onmouseover=window.status=imagine ... ;return(true)"
David Tod Sigafoos ~ SigSolutions
Cell: 503-341-2983
dsig@teleport.com
----
=== At 22 JUN 1999 02:39PM dsig@teleport.com wrote: ===
Actually I was just being lazy so I jumped out there and found
[url=http://www.revelation.com/WEBSITE/DISCUSS.NSF/f12696d31000b22a8525652b00831bb2/e6d5e7a20f60554985256729001a3643?OpenDocument] this promote reference [/url] There are a lot more ... just do a search on 'promote'.
dsig@teleport.com onmouseover=window.status=imagine ... ;return(true)"
David Tod Sigafoos ~ SigSolutions
Cell: 503-341-2983
dsig@teleport.com
http://www.revelation.com/WEBSITE/DISCUSS.NSF/f12696d31000b22a8525652b00831bb2/e6d5e7a20f60554985256729001a3643?OpenDocument
[[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=65F0BF463CA98A4A85256794006A7805|View this thread on the forum...]]