• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 180
  • Last Modified:

Logic problem

Hi Guys

 I have a field AllowanceAH computed Number

AllowanceCalc := @If(CountryAH ="Canada";CanHolAH;
                                                                          CountryAH= "United Kingdom";BritHolAH;
                                                                                                                                         CountryAH= "United States";USHolAH; "");

@If(CountryAH ="";0; CountryAH !="";AllowanceCalc ;AllowanceAH)

I need to be able to overide the values set by AllowaanceCalc

When I change them they reset

Same with this one
@If(CountryAH ="";0 ;CountryAH = "Canada":"United States";5;PersonalDays
  • 2
  • 2
2 Solutions
Create agent to set the values like this

FIELD AllocanceAH = @TextToNumber(@prompt([okcanceledit]; "Title"; "Prompt"; "OverrideValue"));

But if the user opens the document and edits and resaves the document the computation will take over

Make three fields:
AllowanceCalcDefault -- replaces current AllowanceCalc (same field setup and formula)
AllowanceCalcOverride -- editable number
AllowanceCalc -- new field with the following formula:

That's it!  Now, if user leavs AllowanceCalcOverride, it uses the default calculation. If teh user puts in a valid number in the override field, then that value wll be used instead.
For this he has to change lots of formula code...
adspmoAuthor Commented:
I used a combibation of your suggestions abit of my own and away we go
> For this he has to change lots of formula code...
Not really.  Just exactly what I specified... a field rename, a no-formula edit field, and a new field with the old name with the specified formula.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now