Home > Default > Calculation script with multiple conditions

Calculation script with multiple conditions

October 11Hits:0
Advertisement
Hi. I am recreating an order form in Livecycle. I'd like to auto-populate some of the pricing info on the bottom based on data input on the top half of the form.
I've tried several different sets of code, and come up with nothing that works.
Here's an example scenario:
If the checkbox for "offshore" and "bolting" is checked, the numeric field associated with bolting should be $50 * whatever number is in the bolting quantity box.
So i need the script to check the offshore checkbox, and the bolting checkbox, assign a value to the numeric field and multiply it by another numeric field.
There is the added complication of some customers having custom pricing, so I'd need to also figure out a code that is based on the customer selection.
I also thought about, perhaps, putting the price info in drop down lists and enabling/disabling them based on the checkboxes up top.
Ideally, though, the first scenario would be my preference.
I tried this code (and many other variations of it) in both javascript and formcalc...in formcalc i get an error about the &.
if (offshore == 1) && (bolting == 1) then
$.rawValue == $50.00
elseif
(inland == 1) && (bolting == 1) then
$.rawValue == $50.00
elseif
(land == 1) && (bolting == 1) then
$.rawValue == $55.00
elseif
(rig == 1) && (bolting == 1) then
$.rawValue == $50.00
elseif
(plant == 1) && (bolting == 1) then
$.rawValue == $50.00
elseif
(yard == 1) && (bolting == 1) then
$.rawValue == $55.00
else
$.rawValue = 0
endif
any help would be appreciated!

Answers

You need more parenthesis.      
if ((offshore==1) && (bolting==1)){
//do stuff

Read other 2 answers

Tags:

Related Articles

  • Calculation script with multiple conditionsOctober 11

    Hi. I am recreating an order form in Livecycle. I'd like to auto-populate some of the pricing info on the bottom based on data input on the top half of the form. I've tried several different sets of code, and come up with nothing that works. Here's a

  • MDX Calculated Member With Multiple ConditionsNovember 30

    I need to create a calculated member in my cube that spans multiple dimensions. A current calculated member looks like this: [Employee Hours Category].[Utilization Category].[NON-PTO], [Measures].[Employee Hours] This calculated member returns all th

  • Custom Calculation Script - Multiplication IFOctober 11

    Hey Adobe peeps, need help here. I'm not a programmer by any stretch of the imagination, but I am resourceful, BUT I have yet to find a concrete answer for this, nor can I get any of my test formula's to work. I have a fillable PDF that is used in a

  • Calculation formula userexit not working for multiple condition typesNovember 30

    Hi, we have a problem in the CRM ISA-B2B scenario where the custom user exit is only working for single condition type. but we need it for multiple condition types . the value of the subtotal is not being retrieved for multiple conditions. at a time

  • Multiple Condition Calculation - New to NumbersNovember 30

    I am new to numbers and/or excel but what Im trying to do ended up being a lot harder than I thought it should be. Im trying to create a summary of items based on multiple conditions _ID TYPE # DATE_ a000001 1 5 Jan 1, 2008 b000002 7 2 Jan 2, 2008 a0

  • Script with two conditionsOctober 11

    hi friends  I am new to PowerShell and i am studying hard since I've found it excellent to automate administrative tasks in my network. I am trying to write an script whichchecks if ADDS service (which its service name is NTDS) exist & also if it is

  • Essbase Calculation Script taking more time in new environmentNovember 30

    Hi Everyone: We have four environments in our implementation. 1. DEV Environment - 64 bit Essbase Version 11.1.1.3 2. PreProd Environment - 32 bit Essbase Version 9.3.0 3. PreProd Environment - 64 bit Essbase Version 11.1.1.3 In the above mentioned e

  • Regarding Calculation scriptNovember 30

    Hi All, I am trying to move the numbers from all MIS Org Hierarchy lowest level members to one of the lowest level members of MIS (e.g. all MIS numbers into MIS_1900 member). I am using the following calculation script. FIX(&CurMth, @DESCENDANTS("

  • When we use calculation script and when we use business ruleNovember 30

    when we use calculation script and when we use business rule can anyone please tell meRe the OP's question, here is an excellent introduction to Calculation Manager and business rules. It was the first hit when I googled "calculation manager hyperion

  • Which is faster -  Member formula or Calculation script?October 11

    Hi, I have a very basic question, though I am not sure if there is a definite right or wrong answer. To keep the calculation scripts to a minimum, I have put all the calculations in member formula. Which is faster - Member formula or calculation scri

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 1.438 s.