[[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]]
==== Need more Help on changing data field to a formula field (AREV Specific) ====
=== At 15 JUL 1999 09:59:53PM Mark Watford wrote: ===
{{tag>"AREV Specific"}}
Appreciate everyone's help on my earlier problem. I think I have learned a few things. Still cannot figure out how to solve my problem. I need to use a field which is accessed from a subroutine as @record I can't get into the subroutine so if I change the field to a symbolic field the subroutine still looks at the original data in the field when it was a data field. My question is how do I use the original field and make it so that the data in that field is from a formula and the subroutine will access the new data not the original data for that field. My knowledge with AREV is limited I have the RBASIC Book and guess alot. Any help would be appreciated. I am working on this field from a template.
----
=== At 16 JUL 1999 02:28AM amcauley@sprezzatura.com onmouseover=window.status=why not click here to send me email?;return(true)", [url=http://www.sprezzatura.com" onMouseOver=window.status=Why not click here to visit our web site?';return(true)]Sprezzatura Group[/url] wrote: ===
OK - if you are SURE that the subroutine looks at "@Record" rather than {DICTNAME} then you can't achieve what you are trying to achieve the way you are trying to achieve it. Essentially if someone references {DICTNAME} this is treated by the program loader (RTP27) as a function call and the code for {DICTNAME} is loaded onto the program stack and called, resolving it's answer and returning a result.
If they reference @Record they are just referencing a.n.other variable and it is resolved directly in string space with no external function calls.
What you are trying to achieve could be made possible conceiveably by shelling but to explain further I'd prefer some details of what you are trying to achieve and perhaps more importantly why. As in you don't have the source code so are you [i]allowed[/i] to do what you're trying to by your license?
Regards
amcauley@sprezzatura.com
[url=http://www.sprezzatura.com" ]Sprezzatura Group[/url]
[i]World Leaders in all things RevSoft[/i]
[img]http://www.sprezzatura.com/zz.gif[/img]
----
=== At 16 JUL 1999 08:05AM Mark Watford wrote: ===
We are a retail store selling boating equipment. This system was put
together about 10 years ago. I have been given the responsibility of managing it for the last 5 years. My understsnding is that we were
given the location of the source code and could have changes made.
The system has stayed intact with very few changes up until a year
ago. Contacted the original programmer a few months ago to have changes made. He got into the system and discovered the source code for about 90% of the programs was no longer there. Why it was not there is anyone's guess, we had a crash a few years ago maybe that was the cause. He was not interested in rewriting the source code and did not have a copy of it. So I have been left out in the cold. I am guessing that that the program is looking at @record not the dictname. I don't want to change the program, just have it return
the new data from a formula. Thanks if you can be of any help.
----
=== At 16 JUL 1999 09:18AM amcauley@sprezzatura.com onmouseover=window.status=why not click here to send me email?;return(true)", [url=http://www.sprezzatura.com" onMouseOver=window.status=Why not click here to visit our web site?';return(true)]Sprezzatura Group[/url] wrote: ===
OK this [i]assumes[/i] (a very BIG assumption) that @Record is not loaded in the subroutine in question, but rather outside.
Copy OBJECT $MySub to: $MySubOrig
and catalog mysubOrig
(or whereever the code is)
then write a program called MySub (i.e. the original name) that accepts as many parameters as the original (check out byte 4 in the object code, seq it for the number of parameters). In the program simply say
Subroutine MySub(A, B, C...)
SaveDict=@Dict
SaveRecord=@Record
Open "DICT.MYFILE" To @Dict Then
/* Assume @Record and @Id already loaded */
@Record={MYCALC}
Call MySubOrig(A, B, c...)
End
@Dict=SaveDict
@Record=SaveRecord
Return
Backup first!! This is something I would [b]NOT[/b] recommend for the faint hearted.
amcauley@sprezzatura.com
[url=http://www.sprezzatura.com" ]Sprezzatura Group[/url]
[i]World Leaders in all things RevSoft[/i]
[img]http://www.sprezzatura.com/zz.gif[/img]
----
=== At 16 JUL 1999 01:04PM Tony Marler @ Prosolve Software wrote: ===
Mark
Andrews suggestion is excellent. If, as Andrew indicates, it proves that @RECORD is referenced directly in the subroutine then the only way I can see around this is to put an MFS (Modified Filing System) on the file. You would probably need some help with this but in short the following would occur.
The MFS could pick up any request to read (or write etc) field position 6 and intercept it. Then your new routine could redirect to symbolic or simply modify on the fly and send the results back.
The advantage of this is that the MFS would automatically be called regardless of how the file was accessed.
The is not a simple solution but if you must have this then it is an option.
Tony
----
=== At 16 JUL 1999 02:56PM akaplan@sprezzatura.com - [url=http://www.sprezzatura.com]Sprezzatura Group[/url] wrote: ===
Depending on the function of the symbolic this might not work. If the symbolic is relying on current data fields that could be changed in the record, it will return invalid or old information. If so, only way to do it is live time. Also, would hate to have the overhead of an MFS for one template when a read shell there could do the trick.
akaplan@sprezzatura.com
[url=http://www.sprezzatura.com]Sprezzatura Group[/url]
[img]http://www.sprezzatura.com/zz.jpg[/img]
----
=== At 17 JUL 1999 05:52AM Tony Marler @ Prosolve Software wrote: ===
Aaron
]
Good point but I think you will find that Mark is actually creating a new symbolic field so he will be able to ensure that the symbolic itself is correct.
Tony
----
=== At 22 JUL 1999 01:37PM Mykl Belfatto wrote: ===
Looks perfectly safe to me. That's the way I would've done it. :-)
[[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=4F29BECA614B77EA852567B0000AF9F8|View this thread on the forum...]]