Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Chart Formula Editor Indentation Error

First time post, be gentle 🙂

FYI:  I noticed that in the editor for chart formulas, it can throw an error when you try to break up complex formulas across multiple lines.  Devs do this sometimes to make reading the formulas more easy.  The following code works on one line, but doesn't work on multiple lines.  It may have to do with the quotes marking string literals, but idk.  I'm not sure if it's a bug but FYI it'll save you some time. 

i.e. 

Sum({<BillingWeekStartDate={"<=$(=Date(if(GetSelectedCount([BillingWeekStartDate])=0 ,'1/1/2050', if(GetSelectedCount([BillingWeekStartDate]) = 1 ,GetFieldSelections([BillingWeekStartDate]),SubField(GetFieldSelections([BillingWeekStartDate],',',GetSelectedCount([BillingWeekStartDate])),',',GetSelectedCount([BillingWeekStartDate]))))))"}>}HourlyRevenue+FixedFeeRevenue+BurnedRevenueSubcon-ResourceCostSubcon+RevenueAdjust)

Becomes:

Sum({<BillingWeekStartDate=

     {"<=$(=Date(

          if(GetSelectedCount([BillingWeekStartDate])=0

               ,'1/1/2050'

               , if(GetSelectedCount([BillingWeekStartDate]) = 1                    

               ,GetFieldSelections([BillingWeekStartDate])

               ,SubField(GetFieldSelections([BillingWeekStartDate],',',GetSelectedCount([BillingWeekStartDate])),',',GetSelectedCount([BillingWeekStartDate]))))))"

     }>}HourlyRevenue+FixedFeeRevenue+BurnedRevenueSubcon-ResourceCostSubcon+RevenueAdjust

)

0 Replies