Jump to content

Use Cascading Dropdown Value In Onchange Event


Recommended Posts

Hi there, hope someone out there can help me with this problem. I have a form with cascading dropdowns, so when someone chooses a product, the price field is looked up. If someone changes the product, the price of the new product is looked up correctly. So far, no problem. However, what I want to do is show the user a running total of the order value, and to re-caclulate the total if the product selection changes. The problem is that if I put the calculation into the product onchange event, the new price is not yet looked up into the price field. The price onchange event doesn't fire, which I guess is due to the fact that it is looked up automatically. So what I need is either an event that DOES fire when the price is re-loaded. Any ideas?

 

Link to comment
Share on other sites

Hi ab2013,

There are two things I think you may try.

First is to use the setInterval() method of javaScript. In this way you may set up the re-calculation of your total to every certain interval of time. http://www.w3schools.com/jsref/met_win_setinterval.asp

Another way is to use the calculated fields of Caspio Bridge. More information about it in this article. http://howto.caspio.com/datapages/reports/advanced-reporting/calculations-in-forms-and-reports/

 

Hope it helps.

Regards.

Link to comment
Share on other sites

Hi ab2013,

 

I think, I see one more way, but I am not sure that it is the best.

Can you use the price as "value" of your dropdown?

You can use a View to join tables.

 

You can save your cascading dropdown, but edit the settings - to set Filter cascade by the same field as the field for display.

 

And please remember, that a cascading element becomes dynamic.

Link to comment
Share on other sites

  • 4 years later...

Hi @ab2013,

As of July 12, 2018, Caspio introduced new features which you can find here: https://howto.caspio.com/release-notes/caspio-bridge-13-0/

This release includes a new feature, Calculated Values.  This allows you to generate calculations which you can use to get the value of your dropdown. You can use Virtual field and set it as Calculated Value. In the formula section, insert the field name of your dropdown. 

 

For more information about Calculated Values, you can check these videos:

 

I hope this helps!

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

Loading...
 Share

×
×
  • Create New...