[[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]]
==== Setting record key - "linked" window (OpenInsight 32-bit Specific) ====
=== At 17 MAR 2004 04:13:32PM Warren wrote: ===
{{tag>"OpenInsight 32-bit Specific"}}
In AReve windows I could define "related" windows, which would open a window, passing @id from a function key.
For example, on an order entry window there is a cust_id field, and pressing Alt-F1 would open the customer entry window for whatever was in cust_id.
I can put a button on a OI form and use the "link" button on the properties, but how to I pass the called window cust_id?
----
=== At 18 MAR 2004 10:51AM Leon Shaffer wrote: ===
What about get_property from the form you are coming from, then in the Create event of the called form, do the set_property, read...such as
Button Link Click event
cid=.cust_id-]invalue
----
=== At 18 MAR 2004 10:54AM Leon Shaffer wrote: ===
What about get_property from the form you are coming from, then in the Create event of the called form, do the set_property, read...such as
Button Link Click event
declare function get_property
parent=get_property(@window,'MDIFRAME')
if parent else parent=@window
cid=.cust_id-]invalue
dbinit=cid
w=dialog_box('CUST_FORM',PARENT,dbinit)
In the Create event of the form CUST_FORM
if createparam then
.cust_id-]invalue=createparam
call send_event(@window,'READ')
end
----
=== At 18 MAR 2004 02:12PM Richard Guise wrote: ===
We've been doing this for some while as our data records have far too many fields for a single tabbed window and we also want to be able to vary the mix for different users. We therefore provide a set of screens for different "topics" each having a menu option for the user to choose which other "topic" window he wants to switch to for the current record. The user starts off in a "general" screen.
The essence of the process is then that, when a user switches "topic" screen, the record is saved, the key is passed as a Create parameter along with the browse list (if there is one) and browse position, and the next window is started and the old window is closed (not necessarily in that exact order, I forget). The new window create event picks up the Create param and feeds the key or the browse list and position and does a READ.
Rather than have several fixed menu items on every screen there's a single menu item which calls a dialog screen with the current "topic" diabled. Thus an individual user's mix of "topics" screens can be defined just by tweaking this one dialogue screen.
Hope this helps and suggests a few further ideas/possibilities.
----
=== At 24 MAR 2004 03:40PM Warren wrote: ===
Worked like a champ. Thanks. I wasn't sure how to use CreateParam before because the docs were kind of hazy.
[[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=BCDF6C83E0FD0ACF85256E5A006F1A5A|View this thread on the forum...]]