Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>@Withers: #{MyVar} I found did not work when I used my DataContext variable #{DataStoreDbName} in the dblookup: (I do however find your posts very valuable Mr. Withers)<br/></p> <p><strong>These didn't work</strong>:</p> <pre><code>#{DataStoreDbName} @Sum(@DbLookup("#{DataStoreDbName}","personnelbudget",compositeData.catid,10)) #{id:DataStoreDbName} @Sum(@DbLookup("#{id:DataStoreDbName}","personnelbudget",compositeData.catid,10)) </code></pre> <p><strong>This Did Work</strong></p> <p>I like the way dataContext var's show up in the list of DataSources in the Data section of the Properties Tab of the Control under which the DataContext was entered.</p> <ol> <li>Start with defining the DataContext: var = DataStoreDbName<br/></li> <li><p>This Data Context variable is an external database of Server:DB that I am using in @DbLookup's.<br/></p> <p>"<strong>DataStoreDbName</strong>" variable name now shows up in the Data sources under the Data Section:</p></li> <li><p>This is the DbLookup I am using the DataContext in: @Sum(@DbLookup(<strong>DataStoreDbName</strong>,"personnelbudget",compositeData.catid,10))</p></li> </ol> <p><img src="https://i.stack.imgur.com/i4y1v.png" alt="enter image description here"></p> <ol start="4"> <li>Above is an example of another DataConext (obviously), but here is how the variable name was used in computations in fields or customCoverters of Hidden fields (which makes hidden fields act like computed fields in Notes). *Notice @Text()'ing the sum to avoid throwing an error.</li> </ol> <p><img src="https://i.stack.imgur.com/mwN9j.png" alt="enter image description here"></p> <p>The &lt;xp:text> simply shows the DataContext variable value, while the &lt;xp:inputHidden> uses the DataContext variable value in the customCoverter to store/persist the value on Submit/Save.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload