User Tools

  • Vistasource Document Library

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rtw_4.5:rtshare_operation [2013/04/08 17:05]
cjaeger [Requesting Data with the RTD Function]
rtw_4.5:rtshare_operation [2018/08/04 20:09] (current)
Line 31: Line 31:
 This option provides an easy way to automatically insert a request for a single record. ​ This option provides an easy way to automatically insert a request for a single record. ​
  
-Select **Vistasource -> RTSHARE -> Requests ->Quick Request** to create a subscribe request. ​+Select **Vistasource -> RTSHARE -> Requests -> Quick Request** to create a subscribe request. ​
  
 The RTSHARE Quick Request dialog box contains the following options: The RTSHARE Quick Request dialog box contains the following options:
Line 105: Line 105:
  
  
-In RTSHARE, the Microsoft (r) Excel RTD function is used for requesting and inserting data. For more information about the syntax of the RTD when used in RTSHARE, see [[#​Requesting Data with the RTD Function]] and [[#​Inserting Data with the RTD Function]].+In RTSHARE, the Microsoft (r) Excel RTD function is used for requesting and inserting data. For more information about the syntax of the RTD function ​when used in RTSHARE, see [[#​Requesting Data with the RTD Function]] and [[#​Inserting Data with the RTD Function]].
  
 Vistasource recommends using the supplied [[#wrapper functions]] RTS_SHARE and RTINSERT_SHARE to simplify the use of the RTD function. ​ Vistasource recommends using the supplied [[#wrapper functions]] RTS_SHARE and RTINSERT_SHARE to simplify the use of the RTD function. ​
Line 114: Line 114:
 ====Wrapper functions==== ====Wrapper functions====
  
-The following wrapper functions are available for inserting and requesting data. Wrapper functions call the RTD function with the required default arguments, plus the given arguments. In this way, redundant arguments are hidden, exposing only the data that is important to you. +The following wrapper functions are available for inserting and requesting data with RTSHARE. Wrapper functions call the RTD function with the required default arguments, plus the given arguments. In this way, redundant arguments are hidden, exposing only the data that is important to you. 
  
 ===Requesting Data=== ===Requesting Data===
Line 123: Line 123:
 |**ARGUMENTS** | Hostname, Recordname| |**ARGUMENTS** | Hostname, Recordname|
 |**EXAMPLE** | <​code>​=RTS_SHARE("​MyHost",​ "​MyRec"​)</​code>​| |**EXAMPLE** | <​code>​=RTS_SHARE("​MyHost",​ "​MyRec"​)</​code>​|
-|**DESCRIPTION** | Receives value of MyRec using the specified RTSHARE server|+|**DESCRIPTION** | Receives value of MyRec using the specified RTSHARE server.|
 |**NOTES** | Recordname is obligatory. If no hostname is provided, then connection to the local machine is attempted.| |**NOTES** | Recordname is obligatory. If no hostname is provided, then connection to the local machine is attempted.|
  
Line 129: Line 129:
 ===Inserting Data=== ===Inserting Data===
  
-The wrapper ​functions ​RTINSERT_SHARE is used to insert data.+The wrapper ​function ​RTINSERT_SHARE is used to insert data.
  
 |**FUNCTION**|RTINSERT_SHARE| |**FUNCTION**|RTINSERT_SHARE|
 |**ARGUMENTS**|ContribCell,​ Hostname, Recordname| |**ARGUMENTS**|ContribCell,​ Hostname, Recordname|
 |**EXAMPLE**|<​code>​=RTINSERT_SHARE(a1,​ "​MyHost",​ "​MyRec"​)</​code>​| |**EXAMPLE**|<​code>​=RTINSERT_SHARE(a1,​ "​MyHost",​ "​MyRec"​)</​code>​|
-|**DESCRIPTION**|Shares the cell value of for recordname ​ MyRec using the specified RTSHARE server.|+|**DESCRIPTION**|Shares the cell value of the specified cell for recordname ​ MyRec using the specified RTSHARE server.|
 |**NOTES**|ContribCell and Recordname are obligatory. If no Hostname is provided, then connection to the local machine is attempted.| |**NOTES**|ContribCell and Recordname are obligatory. If no Hostname is provided, then connection to the local machine is attempted.|
  
  
 +<​note>​When inserting values with RTINSERT_SHARE,​ the output cell may show an initial #N/A, This is intrinsic to how an RTD server works, data is not dropped. As soon as the actual value is available, OK is displayed, indicating that the insert was successful. For more information see: [[http://​msdn.microsoft.com/​en-us/​library/​aa140060(v=office.10).aspx#​odc_xlrtdfaq_whyalwaysna|msdn.microsoft.com]]</​note> ​
 +===Requesting Data with the RTD Function===
  
 +The generic syntax for the Microsoft Excel(r) RTD function is as follows:
 + 
 +<​code>​=RTD(ProgId,​ Server, Topic1, [Topic2], ...) </​code>​
  
-===Requesting Data with the RTD Function===+When using RTSHARE to request data, the RTD function takes the following arguments:
  
-The RTD function uses the following arguments when requesting data: +<​code>​=RTD(ProgId, ​Server, CommandServiceHostnameRecordname</​code>​
-  +
-=RTD(ProgId, ​servercommandhostrecordname)+
    
 The arguments have the following meaning: The arguments have the following meaning:
  
 ^Argument^Explanation^ ​ ^Argument^Explanation^ ​
-|ProgID|The name of the RTW RTD Server, Vistasource.RtdServer| +|ProgID|The name of the RTW RTD Server, Vistasource.RtdServer.
-|Server |Remains null| +|Server |Remains null.
 |Command|“rt”,​ to indicate the subscribe command.| ​ |Command|“rt”,​ to indicate the subscribe command.| ​
-|Service|rtshare| +|Service|The name of the service, ​rtshare.
-|Host|The RTSHARE server facilitating the request. If left blank, local host will be used, i.e. the machine name where the RTSHARE server is running|+|Hostname|The RTSHARE server facilitating the request, i.e. the machine name where the RTSHARE server is running.  If left blank, localhost will be used. |
 |Recordname|The name of the record that is requested.| ​ |Recordname|The name of the record that is requested.| ​
    
-The following formula ​request ​the value of MyKey on server MyHost:+The following formula ​requests ​the value of MyRec on server MyHost:
  
-''''​=rtd ("vistasource.rtdserver",,"​rt","​rtshare","​MyHost","​MyKey")'''' ​\\ +<​code>​=RTD("Vistasource.RtdServer",,"​rt","​rtshare","​MyHost","​MyRec")</​code> ​\\
-''​+
  
  
  ​===Inserting Data with the RTD Function===  ​===Inserting Data with the RTD Function===
  
-The RTD function ​uses the following argument when inserting data: +The generic syntax for the Microsoft Excel RTD function ​is as follows:
-  +
-=RTD(ProgId,​ server, command, host, recordname])+
    
 +<​code>​=RTD(ProgId,​ Server, Topic1, [Topic2], ...) </​code>​
 +
 +When using RTSHARE to insert data, the RTD function takes the following arguments:
 +
 +<​code>​=RTD(ProgId,​ Server, Command, ContribCell,​ Service, Hostname, Recordname) </​code>​
 +
 +
 The arguments have the following meaning: The arguments have the following meaning:
  
Line 174: Line 181:
 |Server |Remains null.| ​ |Server |Remains null.| ​
 |Command|“rtinsert”,​ to indicate the insert command.| ​ |Command|“rtinsert”,​ to indicate the insert command.| ​
-|Data range|The cell location for the data being inserted.| +|ContribCell|The cell location for the data being inserted.| 
-|Service|rtshare| +|Service|The name of the service, ​rtshare.
-|Host|The RTSHARE server facilitating the request. If left blank, local host will be used, i.e. the machine name where the RTSHARE server is running.| +|Hostname|The RTSHARE server facilitating the request, i.e. the machine name where the RTSHARE server is running. If left blank, localhost will be used.| 
-|Recordname|The name of the record ​that is requested.| +|Recordname|The name of the record ​of which to insert data.| 
    
-The following formula inserts the value of MyKey on server MyHost ​in cell a1:\\ +The following formula inserts the value of A1 using the recordname MyRec on server MyHost:\\
- +
-'' ​ =rtd ("​vistasource.rtdserver",,"​rtinsert",​ a1,"​rtshare","​MyHost","​MyKey"​) +
-''​+
  
 +<​code>​=RTD("​Vistasource.RtdServer",,"​rtinsert",​ a1,"​rtshare","​MyHost","​MyRec"​)</​code>​\\
  
 ==== Status Window for the RTSHARE Client==== ==== Status Window for the RTSHARE Client====