Skip to main content
Known Participant
August 20, 2020
Answered

dropdown list calculation with independent values

  • August 20, 2020
  • 1 reply
  • 2777 views

Dropdown list1:

2 different doses of the same medication:

  • dose1
  • dose2

 

Dropdown list2:

3 different frequency of application of this medicine

  • every8hours (Q8h)
  • every6hours (Q6h)
  • every12hours (Q12h)

 

I would like to have a script to calculate the possibilities in one place on a pdf form:

  • dose1 (Q8h): meaning dose1 would be divided by 3 times per day
  • dose 1 (Q6h): meaning dose1 would be divided by 4 times per day
  • dose 1 (Q12h): meaning dose1 would be divided by 2 times per day

And the same for the dose2.

 

Thanks,

 

try67

I would appreciate your help in this.

Thanks,

 

 

 

This topic has been closed for replies.
Correct answer Asim123

Thanks Asim for trying to help me.

If I can get the script for the following sentence, regardless what they are representing as numbers or doses this will fix my problem:

 

if drop1=choice A and drop2=Q8h

then event value= choice A/ 3

and 

if drop1=B and drop2=Q12h

then event value= B/ 2


Give export value in dropdown1 dose1 100 and dose2 200, for dropdown2 give export value to Q6h 4, to Q8h 3, and to Q12h 2,  also select "commit value immediately in both fields.

In your text box enter this script:

event.value = this.getField("Dropdown1").value/this.getField("Dropdown2").value;
if(event.value == "NaN"||event.value == "Infinity"){
event.value = "";}

1 reply

Inspiring
August 22, 2020

can you be more specific. what are you actually try to calculate?

dose1 (Q8h): meaning dose1 would be divided by 3 times per day - how you want to calculate this?

Known Participant
August 22, 2020

dose 1 is 100 mg/kg/d

dose 2 is 200 mg/kg/d

This is the first drop list

 

second drop list has the options of the possible frequencies:

Q8h, Q6h, Q12h

and as you said: Q8h means I have to divide the dose by 3 (and by 4 for Q6h, and by 2 for Q12h)

Thanks,

 

 

Inspiring
August 27, 2020

Dropdown list1:

2 different doses of the same medication:

  • dose1
  • dose2

 

Dropdown list2:

3 different frequency of application of this medicine

  • every8hours (Q8h)
  • every6hours (Q6h)
  • every12hours (Q12h)

 

I would like to have a script to calculate the possibilities in one place on a pdf form:

  • dose1 (Q8h): meaning dose1 would be divided by 3 times per day
  • dose 1 (Q6h): meaning dose1 would be divided by 4 times per day
  • dose 1 (Q12h): meaning dose1 would be divided by 2 times per day

And the same for the dose2.

 

Thanks,

 


Can you show us example how you have imagine this calculation pls?