Jump to content
  • 0

change the value of another field in the same table


ElkeD
 Share

Question

Hello,

I asked my question to the Caspio Support Portal but they told me to ask you in the forum :)

I want in a "Search and Report Wizard --> Details Page" do the following:

When the value of a dropdown change, than change the value of another field in the same table

Like:

When I choose in a dropdown "yes",
than the value of another field in the same table change to "Funnel_1"

It this possible?

(I have no java experience)

Thanks a lot for the information.

Kind regards, Elke

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Is this value always depends to the dropdown value and user cannot edit it? Id yes, You can add a formula field to your table and use this SQL statement:

 

CASE WHEN dropdownfieldname = 'YES' THEN ' Funnel_1 ' END 

Otherwise you can have JS on your details page:


 

<script>

document.getElementById('caspioform').onsubmit = function (){

if (document.getElementsByName('dropdow ID')[0].value == 'yes' ){

document.getElementsByName('other field ID')[0].value = "Funnel_1" ;

}
}
</script>

Replace dropdown ID and other field ID with appropriate IDs which should be "EditRecordFieldName"

Link to comment
Share on other sites

  • 0

Dear MayMusic,

Thanks a lot for your support. It doesn't work yet. This is what I did:

I placed the script in the footer om my form.

The name of the form is " Appointment_test_java"

The name of the dropwdown field is "Appointment"

The name of the field who has to change is "Funnel"

 

<script>

document.getElementById('Appointment_test_java').onsubmit = function (){

if(document.getElementsByName('EditRecordAppointment’)[0].value == ‘Yes' ){

document.getElementsByName('EditRecordFunnel')[0].value = "Funnel_1";

}

}

</script>

 

 

Do I something wrong?

Sincerely yours,

Elke

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.

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

×
×
  • Create New...