Jump to content
  • 0
Elena

Automatic Field Update

Question

Hello,

 

In my Report Details,  I have this field, "New_Job_Grade" that takes value from calculated field, [@calcfield:44#].

 

I am using the script below which I copied from somewhere else here in the forum. It sure works wonderfully.

 

However, I would like for the field "New_Job_Grade" to be automatically updated and not wait for the form to be submitted everytime "[@calcfield:44#]" is changed.

 

Is there a way to amend the ".onsubmit=concatenate" to automatically update the form and not having the need to push any button?

 

Thank you in advance. Below is the script.

 

 

 

<SCRIPT LANGUAGE="JavaScript">

function concatenate()
{
var x = document.getElementsByName("[@calcfield:44#]")[0].value;

document.getElementById("InsertRecordNew_Job_Grade").value = x;

}

document.getElementById("caspioform").onsubmit=concatenate;
</SCRIPT>

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hello Elena!

 

You can try to activate your function when changes were made in the Calculation Field. For this try to change the last line of the script (.onsubmit->.onchange, so it will we as follows:

<SCRIPT LANGUAGE="JavaScript">

function concatenate()
{
var x = document.getElementsByName("[@calcfield:44#]")[0].value;

document.getElementById("InsertRecordNew_Job_Grade").value = x;

}

document.getElementById("caspioform").onchange=concatenate;
</SCRIPT>

i hope this helps.

 

Have a nice day 

 

Aurora  :)

Share this post


Link to post
Share on other sites
  • 0

Hi Aurora

i am a new caspio user here. The question from Elana is relevant to  me too. But  where do you put the script. Is it  only in  Report Details page? Can i put it in  the result page for inline  editing?

thanks

:)  

Share this post


Link to post
Share on other sites
  • 0

Hi All, 

Just to give an update, we now have a new feature called Calculated Value in Caspio Bridge. The Calculated Value form element generates dynamic calculations that automatically update as users interact with your form.  You may check this link for more information: https://howto.caspio.com/datapages/datapage-components/calculated-values/

 

-kristina

Share this post


Link to post
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.

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

Loading...

×
×
  • Create New...