# Find / Replace inside calculation fields

**URL:** <https://forum.servoy.com/t/find-replace-inside-calculation-fields/3098>\
**Category:** Classic Servoy\
**Created:** [November 19, 2004, 4:07pm UTC](https://forum.servoy.com/t/find-replace-inside-calculation-fields/3098 "2004-11-19T16:07:25Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![faheemhameed](https://avatars.discourse-cdn.com/v4/letter/f/7ea924/32.png) [@faheemhameed](https://forum.servoy.com/u/faheemhameed)\
**Post date:** [November 19, 2004, 4:07pm UTC](https://forum.servoy.com/t/find-replace-inside-calculation-fields/3098/1 "2004-11-19T16:07:25Z")

</div>

Can I do Find / Replace inside calculation fields?  
I think this is a must have for me (for everyone too). If I change a relation name and that relation is used inside many calculations, then I would be able to do a global find/replace within calculation fields as well.

Thanks  
Hameed

---

<div class="post-metadata">

**Author:** ![RobertMeyer](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@RobertMeyer](https://forum.servoy.com/u/RobertMeyer)\
**Post date:** [November 19, 2004, 4:38pm UTC](https://forum.servoy.com/t/find-replace-inside-calculation-fields/3098/2 "2004-11-19T16:38:11Z")

</div>

sounds like a great idea.

in general, editing of calculations is a little strange; it  
would be great if they could just be opened and edited  
in the method editor along with all global & form methods.

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [November 22, 2004, 2:14pm UTC](https://forum.servoy.com/t/find-replace-inside-calculation-fields/3098/3 "2004-11-22T14:14:30Z")

</div>

both (better search/replace and opening calculations in the method editor) are in the feature db’s. Don’t know exactly what release they will emerge.

---

<div class="post-metadata">

**Author:** ![RobertMeyer](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@RobertMeyer](https://forum.servoy.com/u/RobertMeyer)\
**Post date:** [November 22, 2004, 2:52pm UTC](https://forum.servoy.com/t/find-replace-inside-calculation-fields/3098/4 "2004-11-22T14:52:10Z")

</div>

excellent!

and now one more idea…(i’m full of ideas some days ![:lol:]( "Laughing") );

would it be possible to debug calculations?

---

<div class="post-metadata">

**Author:** ![Harjo](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/harjo/32/4873_2.png) [@Harjo](https://forum.servoy.com/u/Harjo)\
**Post date:** [November 22, 2004, 5:58pm UTC](https://forum.servoy.com/t/find-replace-inside-calculation-fields/3098/5 "2004-11-22T17:58:48Z")

</div>

> RobertMeyer:  
> excellent!
> 
> and now one more idea…(i’m full of ideas some days :lol: );
> 
> would it be possible to debug calculations?

Yes, would be wonderfull

---

<div class="post-metadata">

**Author:** ![faheemhameed](https://avatars.discourse-cdn.com/v4/letter/f/7ea924/32.png) [@faheemhameed](https://forum.servoy.com/u/faheemhameed)\
**Post date:** [November 23, 2004, 2:29am UTC](https://forum.servoy.com/t/find-replace-inside-calculation-fields/3098/6 "2004-11-23T02:29:21Z")

</div>

This is an excellent thing!!

Also it would be much better, if we can be able to find the fields placed in forms (find this by its dataprovider & element name) and labels placed in forms.

Thanks

---

<div class="post-metadata">

**Author:** ![olivier\_melet](https://avatars.discourse-cdn.com/v4/letter/o/ba8739/32.png) [@olivier\_melet](https://forum.servoy.com/u/olivier_melet)\
**Post date:** [November 24, 2004, 12:43pm UTC](https://forum.servoy.com/t/find-replace-inside-calculation-fields/3098/7 "2004-11-24T12:43:31Z")

</div>

> jcompagner:  
> both (better search/replace and opening calculations in the method editor) are in the feature db’s.

Great ![:!:]( "Exclamation")

> jcompagner:  
> Don’t know exactly what release they will emerge.

![:cry:]( "Crying or Very sad")

> RobertMeyer:  
> would it be possible to debug calculations?

PPPPlease ![:!:]( "Exclamation")

---

<div class="post-metadata">

**Author:** ![bcusick](https://avatars.discourse-cdn.com/v4/letter/b/ed8c4c/32.png) [@bcusick](https://forum.servoy.com/u/bcusick)\
**Post date:** [November 24, 2004, 5:54pm UTC](https://forum.servoy.com/t/find-replace-inside-calculation-fields/3098/8 "2004-11-24T17:54:12Z")

</div>

TIP: Great way to debug calculations: create a method that sets a global (or show a dialog) with the result of the calculation. This way you can use the debugger. Once debugged, copy/paste into your calculation (minus the global setting or showDialog). I do this all the time (I have a special “\_aTEST” method for this purpose. WORKS!

Cheers,

Bob Cusick

---

<div class="post-metadata">

**Author:** ![RobertMeyer](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@RobertMeyer](https://forum.servoy.com/u/RobertMeyer)\
**Post date:** [November 24, 2004, 6:09pm UTC](https://forum.servoy.com/t/find-replace-inside-calculation-fields/3098/9 "2004-11-24T18:09:02Z")

</div>

but this doesn’t let you actually debug (step thru, and examine  
variables in) the calculation, does it?

a trick i use a lot is to put “application.output()” statements  
in the calcs to dump info as i’m debugging.

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [November 25, 2004, 4:30pm UTC](https://forum.servoy.com/t/find-replace-inside-calculation-fields/3098/10 "2004-11-25T16:30:15Z")

</div>

you can debug a calculation if you really want it.  
Just make a global method where you move the code of the calculation for a while.  
Then call that global method in that calculation (return globals.testCalcMethod()😉

Set the breakpoint in the global method.

---

<div class="post-metadata">

**Author:** ![RobertMeyer](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@RobertMeyer](https://forum.servoy.com/u/RobertMeyer)\
**Post date:** [November 25, 2004, 4:38pm UTC](https://forum.servoy.com/t/find-replace-inside-calculation-fields/3098/11 "2004-11-25T16:38:43Z")

</div>

sounds good! thanks.
