Solved

Logic problem

Posted on 2003-12-02
5
172 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

773 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