Jump to content

Capturing Data From A Virtual Field (Virtual Field Is Used For Keyword Search Across Database)

Recommended Posts

We are have created a two web page setup that allows us to do a keyword search across the database. The field in question is 'keywords', and is a virtual field. The challenge is, we would like to capture the search terms being entered in the 'keywords' field and save them to another table.


Is this even possible? We are getting stymied by the virtual field aspect - how to maintain it as a virtual field, but also capture the data entered there. 




Thank you!

Link to comment
Share on other sites

I think you should be able to adapt this to your needs:



It shows how to use a javascript to capture entries in virtual fields and copy them to a hidden field that gets saved.

so your virtual keyword search field is analogous to the "minutes" field in that thread, and the field where you are storing searches is analogous to the hidden "date/time" field from the thread.


Something like

document.getElementById('Submit').onmouseover = function(){
var storedkeyword = document.getElementById('cbParamVirtual1').value;
document.getElementById('InsertRecordStoredKeywordFieldHere').value = storedkeyword;

where cbParamVirtual1 is your virtual search field

and InsertRecordStoredKeywordFieldHere is a Hidden field where you will copy the input to for storing.


Note that the table with the StoredKeywords is the one that must be editable in the View used on the datapage.

Link to comment
Share on other sites

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.

Reply to this topic...

×   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...