Easy to Create, Easy to Change - Easy to use!

Function::Internal

jsDerivation

jsDerivation(Derivation) var CustomerName = jsDerivation("CustomerName") ; var AddToFieldInForm = jsDerivation("Price+vat") ; var tester = document.getElementById("CustomerAddress").value=jsDerivation("GetValue(\"CustomerAddress\")"); Save Changes!

This is the same function as ExecDerivation() but the difference is that it is a built in function in DE85 WebObject and is called as a JavaScript function in HTML.

It will "talk" with the form where the WebObject is the same way any other Derivation will in the same form, but the "brilliance" is that it called/triggered in HTML and it returns the result to the HTML.

This is the bridge between the HTML object and the rest of your application

Parameters


Derivation: String

Any derivation that you could execute in a normal derivation field in DataEase 8.5. The WebObject has the context of the underlaying form so you can use relationships/lookup/sum of etc the same way as you can in any other derived field etc.

Returns/Result


String: Result of derivaation

Examples


Example 1
<style>

body {color:white;}

</style>

<h1>DataEase Web Hosted Form Test</h1>

<p>This is a test on TWO-Way communication between WebObject and PRISM</p>

<p>This form is hosted on a remote server, but commuicate with the local PRISM.....</p>

<p id="message">Your message</p>

<input id="CustomerName" placeholder="Customer Name" value="" style="width:30%">

<input id="CustomerAddress" placeholder="Customer Address" value="" style="width:30%">

<br>

<a onclick='jsSetValue("CustomerName","CustomerName");jsSetValue("CustomerAddress","CustomerAddress");jsDerivation("RecordSave()");'>Save Changes!</a>

<script>

var tester = document.getElementById("CustomerName").value=jsDerivation("CustomerName");

var tester = document.getElementById("CustomerAddress").value=jsDerivation("GetValue(\"CustomerAddress\")");

</script>

<p style="margin-top:100px;padding:10px;border:solid 1px">This is "impossible".....but works!</p>

Reference

See Also


jsSetValue()
ExecDerivation()
ExecDQL()
MemoExecDQL()
LabelExecDQ()

On the forum about jsDerivation

On the blog about jsDerivation