Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Logic problem

Posted on 2003-12-02
5
173 Views
Last Modified: 2013-12-18


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
0
Comment
Question by:adspmo
  • 2
  • 2
5 Comments
 
LVL 24

Assisted Solution

by:HemanthaKumar
HemanthaKumar earned 150 total points
ID: 9859704
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

~Hemanth
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 200 total points
ID: 9859782
Make three fields:
AllowanceCalcDefault -- replaces current AllowanceCalc (same field setup and formula)
AllowanceCalcOverride -- editable number
AllowanceCalc -- new field with the following formula:
@If(@IsError(AllowanceCalcOverride*1);AllowanceCalcDefault;AllowanceCalcOverride)

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.
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9859821
For this he has to change lots of formula code...
0
 

Author Comment

by:adspmo
ID: 9860450
I used a combibation of your suggestions abit of my own and away we go
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9861580
HemanthaKumar,
> 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.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question