Skip to main content
Known Participant
Aug 6, 2018 12:08 PM UTC
Answered

Help with simple conditional form

Hi,

I just need to create a calculation in which, in column A (Número de tarjetas a almacenar) you have a list of options to be selected. Depending on the option you select, the price is shown on column B.

Just with this, I would be really happy :-).

An aditional question is if I can determine as an exeption that if you select the last option "Más de 10000", then the price "Coste mensual" is calculated with a formula which is a number from another box* 3

Many thanks!

This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Aug 6, 2018 1:59 PM UTC

OK. As the custom calculation script of the text field you can enter something like this:

var v = this.getField("Número de tarjetas a almacenar").valueAsString;

if (v=="0 - 300") event.value = "8€";

else if (v=="300 - 600") event.value = "11€";

else if (v=="600 - 1000") event.value = "15€";

// etc.

11 replies

try67
Community Expert
Community Expert
Aug 6, 2018 12:23 PM UTC

You need to provide the full details of which value should appear in the text field for each of the values selected in the drop-down.

Translate
Known Participant
Aug 6, 2018 12:48 PM UTC

0 - 300                   8€

300 - 600               11€

600 - 1000               15€

1000 - 3000               35€

3000 - 5000               60€

5000 - 10000               100€

Mas de 10.000               Precio personalizado

Thanks!

Translate
try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
Aug 6, 2018 1:59 PM UTC

OK. As the custom calculation script of the text field you can enter something like this:

var v = this.getField("Número de tarjetas a almacenar").valueAsString;

if (v=="0 - 300") event.value = "8€";

else if (v=="300 - 600") event.value = "11€";

else if (v=="600 - 1000") event.value = "15€";

// etc.

Translate