Jump to content


I'm trying to trigger a calculated field contingent on a select2 field  or a hidden calculated field and I can't make it work. 

This is what I have: 

Field1(Cascading Dropdown Field for value: Field_ID) (converted into a select2 element using $('select[name="InsertRecordField1"]').select2();)

VirtualField1 (Calculated Field) (Using the following sql SELECT Field_Name FROM Table WHERE [@field:Field1] = Field_ID)

The SQL doesn't notice the changes made to Field1 nor its initial value on page load.

I tried using JavaScript and SQL to give Field1's value to a another hidden Virtual Field and trigger the SQL with the following code:


document.getElementById('caspioNote').onmousemove = function() {myFunction();};

function myFunction() {

var i = document.getElementsByName('InsertRecordField1')[0].value;

document.getElementsByName('cbParamVirtual2')[0].value = i;




SQL for VirtualField1:

SELECT Field_Name FROM Table WHERE [@cbParamVirtual2] = Field_ID


The JavaScript works fine but the SQL does not seem to notice the changes in VirtualField2

This happens to other cascading fields too when I use VirtualField2 as the Parent Field.


How could I archive this? Thanks in advance 

Share this post

Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...