CalcBuilder Forum

multiple trigger fields

User Dreamless 2018-06-25 23:38:34

Hello,

I have a calculator that consists of several option lists and a linked list (sql). Option lists provide criteria according to which a list of database items are displayed in linked list (sql). Selecting an item gives detailed information about it. Calculator works, but since I can only choose 1 trigger field in options, linked list (sql) is only updated when changing that one specific field. How do I make that changing any of the option lists would trigger linked list (sql) update?

Moonsoft support 2018-06-26 08:35:31

Hi,
that's right, the sql linked list only allows to configure using one trigger field, but you can force to reload on other field change just launching the event manually, this way:

Let's say you have the following fields:
myselect1 - option list
myselect2 - option list
myselect3- option list
myselect4- linked list sql. Trigger field = myselect1

With this configuration you will see myselect4 refreshing whenever myselect1 is changed. In order to reload on every change of myselect2 and myselect3 as well, you can add some lines to the first javascript tab of your calculator:

//when myselect2 changes---fire myselect1 change event. This will reload myselect4
CB("select").change(function(){
CB("select").change();
});

//when myselect3 changes---fire myselect1 change event. This will reload myselect4
CB("select").change(function(){
CB("select").change();
});

This should do the work.

Regards

Edited by MSTeam - 26.06.2018 08:36

User Dreamless 2018-06-26 21:10:36

Thank you, works as intended now.

...
CalcBuilder

Create dynamic calculators

Buy now!
...
Support/development 40 hours

With the peace of mind of having a professional team at your service (20% discount)

Buy now!