cancel
Showing results for 
Search instead for 
Did you mean: 

A way to change a field from one type to another?

Former Member
0 Kudos

I need to change a large number of running total fields to formulas based on those running totals. They already have custom formatting and suppression applied. Is there anyway to switch the source/type of the field from the running total to the formula so I don't have to manually re-apply all the complex formatting and suppression rules?

Accepted Solutions (1)

Accepted Solutions (1)

former_member292966
Active Contributor
0 Kudos

Hi,

If your formatting is with suppression and formatting outside the formula then the answer is no. I'm not exactly sure what you want to do but if , for example, your running total is returning a number and you want to view it as a date. Pass the total to a new formula and convert it in the new formula.

You can use ToText which will allow you to convert almost any type to a string and format it. For example:

WhilePrintingRecords; 
NumberVar myVariable; 
ToText (myVariable, "yyyy/MM/dd");

Will convert the formula to a string date or

WhilePrintingRecords; 
NumberVar myVariable; 
ToText (myVariable, "", "");

Will convert a number to a string integer.

You could do something similar using ToNumber or CDate.

Good luck,

Brian

Answers (0)